@epilot/sdk 2.1.6 → 2.1.8
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.
- package/definitions/kanban.json +25 -1
- package/definitions/permissions.json +41 -6
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-management.cjs +6 -6
- package/dist/apis/data-management.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/erp-integration.cjs +6 -6
- package/dist/apis/erp-integration.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.d.cts +2 -2
- package/dist/apis/kanban.d.ts +2 -2
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.d.cts +2 -2
- package/dist/apis/permissions.d.ts +2 -2
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-DDMVRJDZ.cjs → chunk-GHAEATNY.cjs} +2 -2
- package/dist/{chunk-EQYWNVI2.js → chunk-V3SZ5A6F.js} +2 -2
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/kanban-E2UOBVBK.cjs +7 -0
- package/dist/kanban-PMG5TXE5.js +7 -0
- package/dist/{kanban.d-CtSt3uX2.d.cts → kanban.d-B99GucT_.d.cts} +18 -3
- package/dist/{kanban.d-CtSt3uX2.d.ts → kanban.d-B99GucT_.d.ts} +18 -3
- package/dist/permissions-X3SJVSPC.js +7 -0
- package/dist/permissions-ZJHUIBWY.cjs +7 -0
- package/dist/{permissions.d-BHB1FFS5.d.ts → permissions.d-l6AT8SYP.d.cts} +31 -4
- package/dist/{permissions.d-BHB1FFS5.d.cts → permissions.d-l6AT8SYP.d.ts} +31 -4
- package/docs/kanban.md +39 -1
- package/docs/permissions.md +34 -9
- package/package.json +1 -1
- package/dist/kanban-CHTH2ZSY.cjs +0 -7
- package/dist/kanban-HI6LL5WY.js +0 -7
- package/dist/permissions-4T3GFNB4.js +0 -7
- package/dist/permissions-FGBIJNN7.cjs +0 -7
package/docs/kanban.md
CHANGED
|
@@ -44,6 +44,7 @@ const { data } = await kanbanClient.createKanbanBoard(...)
|
|
|
44
44
|
- [`Board`](#board)
|
|
45
45
|
- [`Swimlane`](#swimlane)
|
|
46
46
|
- [`Sorting`](#sorting)
|
|
47
|
+
- [`GroupBy`](#groupby)
|
|
47
48
|
- [`BoardFilter`](#boardfilter)
|
|
48
49
|
- [`FilterGroup`](#filtergroup)
|
|
49
50
|
- [`FilterOperator`](#filteroperator)
|
|
@@ -113,6 +114,9 @@ const { data } = await client.createKanbanBoard(
|
|
|
113
114
|
field: 'created_at',
|
|
114
115
|
direction: 'asc'
|
|
115
116
|
},
|
|
117
|
+
group_by: {
|
|
118
|
+
field: 'context_entity'
|
|
119
|
+
},
|
|
116
120
|
search_query: 'task 1'
|
|
117
121
|
}
|
|
118
122
|
},
|
|
@@ -174,6 +178,9 @@ const { data } = await client.createKanbanBoard(
|
|
|
174
178
|
"field": "created_at",
|
|
175
179
|
"direction": "asc"
|
|
176
180
|
},
|
|
181
|
+
"group_by": {
|
|
182
|
+
"field": "context_entity"
|
|
183
|
+
},
|
|
177
184
|
"search_query": "task 1"
|
|
178
185
|
}
|
|
179
186
|
}
|
|
@@ -287,6 +294,9 @@ const { data } = await client.getKanbanBoard({
|
|
|
287
294
|
"field": "created_at",
|
|
288
295
|
"direction": "asc"
|
|
289
296
|
},
|
|
297
|
+
"group_by": {
|
|
298
|
+
"field": "context_entity"
|
|
299
|
+
},
|
|
290
300
|
"search_query": "task 1"
|
|
291
301
|
}
|
|
292
302
|
}
|
|
@@ -358,6 +368,9 @@ const { data } = await client.updateKanbanBoard(
|
|
|
358
368
|
field: 'created_at',
|
|
359
369
|
direction: 'asc'
|
|
360
370
|
},
|
|
371
|
+
group_by: {
|
|
372
|
+
field: 'context_entity'
|
|
373
|
+
},
|
|
361
374
|
search_query: 'task 1'
|
|
362
375
|
}
|
|
363
376
|
},
|
|
@@ -419,6 +432,9 @@ const { data } = await client.updateKanbanBoard(
|
|
|
419
432
|
"field": "created_at",
|
|
420
433
|
"direction": "asc"
|
|
421
434
|
},
|
|
435
|
+
"group_by": {
|
|
436
|
+
"field": "context_entity"
|
|
437
|
+
},
|
|
422
438
|
"search_query": "task 1"
|
|
423
439
|
}
|
|
424
440
|
}
|
|
@@ -504,6 +520,9 @@ const { data } = await client.patchKanbanBoard(
|
|
|
504
520
|
"field": "created_at",
|
|
505
521
|
"direction": "asc"
|
|
506
522
|
},
|
|
523
|
+
"group_by": {
|
|
524
|
+
"field": "context_entity"
|
|
525
|
+
},
|
|
507
526
|
"search_query": "task 1"
|
|
508
527
|
}
|
|
509
528
|
}
|
|
@@ -631,6 +650,9 @@ const { data } = await client.executeFlowsQuery(
|
|
|
631
650
|
field: 'created_at',
|
|
632
651
|
direction: 'asc'
|
|
633
652
|
},
|
|
653
|
+
group_by: {
|
|
654
|
+
field: 'context_entity'
|
|
655
|
+
},
|
|
634
656
|
from: 0,
|
|
635
657
|
size: 10
|
|
636
658
|
},
|
|
@@ -726,6 +748,9 @@ type Board = {
|
|
|
726
748
|
field: { ... }
|
|
727
749
|
direction?: { ... }
|
|
728
750
|
}
|
|
751
|
+
group_by?: {
|
|
752
|
+
field: { ... }
|
|
753
|
+
}
|
|
729
754
|
search_query?: string
|
|
730
755
|
}
|
|
731
756
|
}
|
|
@@ -767,6 +792,16 @@ type Sorting = {
|
|
|
767
792
|
}
|
|
768
793
|
```
|
|
769
794
|
|
|
795
|
+
### `GroupBy`
|
|
796
|
+
|
|
797
|
+
Defines how tasks should be grouped within each swimlane. Tasks with the same group value are returned adjacently in the result set.
|
|
798
|
+
|
|
799
|
+
```ts
|
|
800
|
+
type GroupBy = {
|
|
801
|
+
field: "context_entity" | "phase"
|
|
802
|
+
}
|
|
803
|
+
```
|
|
804
|
+
|
|
770
805
|
### `BoardFilter`
|
|
771
806
|
|
|
772
807
|
A filter group containing one or more filter items or nested filter groups. Items are combined using the specified logical operator (AND/OR).
|
|
@@ -831,7 +866,7 @@ type ValueType = string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" |
|
|
|
831
866
|
|
|
832
867
|
### `FlowsQueryRequest`
|
|
833
868
|
|
|
834
|
-
Request payload for executing a query against the Flows dataset. Supports filter conditions, sorting, and offset-based pagination.
|
|
869
|
+
Request payload for executing a query against the Flows dataset. Supports filter conditions, sorting, grouping, and offset-based pagination.
|
|
835
870
|
|
|
836
871
|
```ts
|
|
837
872
|
type FlowsQueryRequest = {
|
|
@@ -851,6 +886,9 @@ type FlowsQueryRequest = {
|
|
|
851
886
|
field: string
|
|
852
887
|
direction?: "asc" | "desc"
|
|
853
888
|
}
|
|
889
|
+
group_by?: {
|
|
890
|
+
field: "context_entity" | "phase"
|
|
891
|
+
}
|
|
854
892
|
from?: number
|
|
855
893
|
size?: number
|
|
856
894
|
}
|
package/docs/permissions.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Permissions API
|
|
2
2
|
|
|
3
|
-
- **Base URL:** `https://permissions.sls.epilot.io`
|
|
4
3
|
- **Full API Docs:** [https://docs.epilot.io/api/permissions](https://docs.epilot.io/api/permissions)
|
|
5
4
|
|
|
6
5
|
## Usage
|
|
@@ -45,6 +44,7 @@ const { data } = await permissionsClient.listCurrentRoles(...)
|
|
|
45
44
|
- [`Grant`](#grant)
|
|
46
45
|
- [`GrantWithDependencies`](#grantwithdependencies)
|
|
47
46
|
- [`GrantCondition`](#grantcondition)
|
|
47
|
+
- [`EqualsCurrentUserCondition`](#equalscurrentusercondition)
|
|
48
48
|
- [`EqualsCondition`](#equalscondition)
|
|
49
49
|
- [`RoleId`](#roleid)
|
|
50
50
|
- [`BaseRole`](#baserole)
|
|
@@ -105,7 +105,8 @@ const { data } = await client.listCurrentRoles()
|
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
107
|
],
|
|
108
|
-
"parent_role": "123:owner"
|
|
108
|
+
"parent_role": "123:owner",
|
|
109
|
+
"vendor_created": true
|
|
109
110
|
}
|
|
110
111
|
]
|
|
111
112
|
}
|
|
@@ -152,7 +153,8 @@ const { data } = await client.listAllRoles()
|
|
|
152
153
|
]
|
|
153
154
|
}
|
|
154
155
|
],
|
|
155
|
-
"parent_role": "123:owner"
|
|
156
|
+
"parent_role": "123:owner",
|
|
157
|
+
"vendor_created": true
|
|
156
158
|
}
|
|
157
159
|
]
|
|
158
160
|
}
|
|
@@ -200,7 +202,8 @@ const { data } = await client.createRole(
|
|
|
200
202
|
]
|
|
201
203
|
}
|
|
202
204
|
],
|
|
203
|
-
"parent_role": "123:owner"
|
|
205
|
+
"parent_role": "123:owner",
|
|
206
|
+
"vendor_created": true
|
|
204
207
|
}
|
|
205
208
|
```
|
|
206
209
|
|
|
@@ -256,7 +259,8 @@ const { data } = await client.searchRoles(
|
|
|
256
259
|
]
|
|
257
260
|
}
|
|
258
261
|
],
|
|
259
|
-
"parent_role": "123:owner"
|
|
262
|
+
"parent_role": "123:owner",
|
|
263
|
+
"vendor_created": true
|
|
260
264
|
}
|
|
261
265
|
]
|
|
262
266
|
}
|
|
@@ -303,7 +307,8 @@ const { data } = await client.getRole({
|
|
|
303
307
|
]
|
|
304
308
|
}
|
|
305
309
|
],
|
|
306
|
-
"parent_role": "123:owner"
|
|
310
|
+
"parent_role": "123:owner",
|
|
311
|
+
"vendor_created": true
|
|
307
312
|
}
|
|
308
313
|
```
|
|
309
314
|
|
|
@@ -343,7 +348,8 @@ const { data } = await client.putRole(
|
|
|
343
348
|
]
|
|
344
349
|
}
|
|
345
350
|
],
|
|
346
|
-
parent_role: '123:owner'
|
|
351
|
+
parent_role: '123:owner',
|
|
352
|
+
vendor_created: true
|
|
347
353
|
},
|
|
348
354
|
)
|
|
349
355
|
```
|
|
@@ -373,7 +379,8 @@ const { data } = await client.putRole(
|
|
|
373
379
|
]
|
|
374
380
|
}
|
|
375
381
|
],
|
|
376
|
-
"parent_role": "123:owner"
|
|
382
|
+
"parent_role": "123:owner",
|
|
383
|
+
"vendor_created": true
|
|
377
384
|
}
|
|
378
385
|
```
|
|
379
386
|
|
|
@@ -418,7 +425,8 @@ const { data } = await client.deleteRole({
|
|
|
418
425
|
]
|
|
419
426
|
}
|
|
420
427
|
],
|
|
421
|
-
"parent_role": "123:owner"
|
|
428
|
+
"parent_role": "123:owner",
|
|
429
|
+
"vendor_created": true
|
|
422
430
|
}
|
|
423
431
|
```
|
|
424
432
|
|
|
@@ -605,6 +613,17 @@ type GrantWithDependencies = {
|
|
|
605
613
|
type GrantCondition = object
|
|
606
614
|
```
|
|
607
615
|
|
|
616
|
+
### `EqualsCurrentUserCondition`
|
|
617
|
+
|
|
618
|
+
Check if any relation_user attribute on the entity contains the current user. When attribute is provided, only that specific attribute path is checked.
|
|
619
|
+
|
|
620
|
+
```ts
|
|
621
|
+
type EqualsCurrentUserCondition = {
|
|
622
|
+
attribute?: string
|
|
623
|
+
operation: "equals_current_user"
|
|
624
|
+
}
|
|
625
|
+
```
|
|
626
|
+
|
|
608
627
|
### `EqualsCondition`
|
|
609
628
|
|
|
610
629
|
Check if attribute equals to any of the values
|
|
@@ -680,6 +699,7 @@ type UserRole = {
|
|
|
680
699
|
conditions?: object[]
|
|
681
700
|
}>
|
|
682
701
|
parent_role?: object
|
|
702
|
+
vendor_created?: boolean
|
|
683
703
|
}
|
|
684
704
|
```
|
|
685
705
|
|
|
@@ -740,6 +760,7 @@ type PartnerRole = {
|
|
|
740
760
|
}>
|
|
741
761
|
partner_org_id?: object
|
|
742
762
|
vendor_enforced_user_limit?: number
|
|
763
|
+
vendor_created?: boolean
|
|
743
764
|
}
|
|
744
765
|
```
|
|
745
766
|
|
|
@@ -779,6 +800,7 @@ type Role = {
|
|
|
779
800
|
conditions?: object[]
|
|
780
801
|
}>
|
|
781
802
|
parent_role?: object
|
|
803
|
+
vendor_created?: boolean
|
|
782
804
|
} | {
|
|
783
805
|
id: string
|
|
784
806
|
name: string
|
|
@@ -821,6 +843,7 @@ type Role = {
|
|
|
821
843
|
}>
|
|
822
844
|
partner_org_id?: object
|
|
823
845
|
vendor_enforced_user_limit?: number
|
|
846
|
+
vendor_created?: boolean
|
|
824
847
|
} | {
|
|
825
848
|
id: string
|
|
826
849
|
name: string
|
|
@@ -913,6 +936,7 @@ type OrgRoles = {
|
|
|
913
936
|
conditions?: { ... }
|
|
914
937
|
}>
|
|
915
938
|
parent_role?: object
|
|
939
|
+
vendor_created?: boolean
|
|
916
940
|
} | {
|
|
917
941
|
id: string
|
|
918
942
|
name: string
|
|
@@ -955,6 +979,7 @@ type OrgRoles = {
|
|
|
955
979
|
}>
|
|
956
980
|
partner_org_id?: object
|
|
957
981
|
vendor_enforced_user_limit?: number
|
|
982
|
+
vendor_created?: boolean
|
|
958
983
|
} | {
|
|
959
984
|
id: string
|
|
960
985
|
name: string
|
package/package.json
CHANGED
package/dist/kanban-CHTH2ZSY.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
-
|
|
3
|
-
// src/docs/kanban.json
|
|
4
|
-
var kanban_default = '# Kanban API\n\n- **Base URL:** `https://kanban.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/kanban](https://docs.epilot.io/api/kanban)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.kanban.createKanbanBoard(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/kanban\'\n\nconst kanbanClient = getClient()\nauthorize(kanbanClient, () => \'<token>\')\nconst { data } = await kanbanClient.createKanbanBoard(...)\n```\n\n## Operations\n\n**Kanban**\n- [`createKanbanBoard`](#createkanbanboard)\n- [`getKanbanBoards`](#getkanbanboards)\n- [`getKanbanBoard`](#getkanbanboard)\n- [`updateKanbanBoard`](#updatekanbanboard)\n- [`patchKanbanBoard`](#patchkanbanboard)\n- [`deleteKanbanBoard`](#deletekanbanboard)\n- [`setDefaultKanbanBoard`](#setdefaultkanbanboard)\n- [`clearDefaultKanbanBoard`](#cleardefaultkanbanboard)\n\n**Query**\n- [`flowsAutocomplete`](#flowsautocomplete)\n- [`executeFlowsQuery`](#executeflowsquery)\n\n**Schemas**\n- [`Error`](#error)\n- [`BoardSummary`](#boardsummary)\n- [`Board`](#board)\n- [`Swimlane`](#swimlane)\n- [`Sorting`](#sorting)\n- [`BoardFilter`](#boardfilter)\n- [`FilterGroup`](#filtergroup)\n- [`FilterOperator`](#filteroperator)\n- [`DynamicDateValue`](#dynamicdatevalue)\n- [`ValueType`](#valuetype)\n- [`FlowsQueryRequest`](#flowsqueryrequest)\n- [`FlowsQueryResult`](#flowsqueryresult)\n- [`FilterItem`](#filteritem)\n\n### `createKanbanBoard`\n\nCreates a new Kanban board with the provided configuration.\n\n`POST /v1/kanban/board`\n\n```ts\nconst { data } = await client.createKanbanBoard(\n null,\n {\n id: \'string\',\n title: \'Board 1\',\n description: \'Board description\',\n created_at: \'1970-01-01T00:00:00.000Z\',\n updated_at: \'1970-01-01T00:00:00.000Z\',\n created_by: \'string\',\n org_id: \'string\',\n updated_by: \'string\',\n shared_with: [\'string\'],\n shared_with_org: true,\n owners: [\'string\'],\n config: {\n dataset: \'workflow_tasks_overview\',\n swimlanes: [\n {\n id: \'string\',\n title: \'Swimlane 1\',\n position: 1,\n filter: {\n items: [\n {\n key: \'assignee\',\n operator: \'EQUALS\',\n value: \'100020\',\n data_type: \'string\'\n }\n ],\n combination: \'OR\'\n },\n title_chip_variant: \'success\'\n }\n ],\n card_config: {\n fields: [\'assignee\']\n },\n board_filter: {\n items: [\n {\n key: \'assignee\',\n operator: \'EQUALS\',\n value: \'100020\',\n data_type: \'string\'\n }\n ],\n combination: \'OR\'\n },\n sorting: {\n field: \'created_at\',\n direction: \'asc\'\n },\n search_query: \'task 1\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "Board 1",\n "description": "Board description",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "org_id": "string",\n "updated_by": "string",\n "shared_with": ["string"],\n "shared_with_org": true,\n "owners": ["string"],\n "config": {\n "dataset": "workflow_tasks_overview",\n "swimlanes": [\n {\n "id": "string",\n "title": "Swimlane 1",\n "position": 1,\n "filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "title_chip_variant": "success"\n }\n ],\n "card_config": {\n "fields": ["assignee"]\n },\n "board_filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "sorting": {\n "field": "created_at",\n "direction": "asc"\n },\n "search_query": "task 1"\n }\n}\n```\n\n</details>\n\n---\n\n### `getKanbanBoards`\n\nReturns a list of all Kanban boards accessible to the authenticated user.\n\n`GET /v1/kanban/boards`\n\n```ts\nconst { data } = await client.getKanbanBoards({\n filter: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "id": "string",\n "title": "Board 1",\n "description": "Board description",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "org_id": "string",\n "updated_by": "string",\n "shared_with": ["string"],\n "shared_with_org": true,\n "owners": ["string"]\n }\n]\n```\n\n</details>\n\n---\n\n### `getKanbanBoard`\n\nRetrieves a Kanban board by ID, including its full configuration (swimlanes, filters, sorting, card fields).\n\n`GET /v1/kanban/board/{boardId}`\n\n```ts\nconst { data } = await client.getKanbanBoard({\n boardId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "Board 1",\n "description": "Board description",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "org_id": "string",\n "updated_by": "string",\n "shared_with": ["string"],\n "shared_with_org": true,\n "owners": ["string"],\n "config": {\n "dataset": "workflow_tasks_overview",\n "swimlanes": [\n {\n "id": "string",\n "title": "Swimlane 1",\n "position": 1,\n "filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "title_chip_variant": "success"\n }\n ],\n "card_config": {\n "fields": ["assignee"]\n },\n "board_filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "sorting": {\n "field": "created_at",\n "direction": "asc"\n },\n "search_query": "task 1"\n }\n}\n```\n\n</details>\n\n---\n\n### `updateKanbanBoard`\n\nFully replaces the configuration of an existing Kanban board by ID.\n\n`PUT /v1/kanban/board/{boardId}`\n\n```ts\nconst { data } = await client.updateKanbanBoard(\n {\n boardId: \'example\',\n },\n {\n id: \'string\',\n title: \'Board 1\',\n description: \'Board description\',\n created_at: \'1970-01-01T00:00:00.000Z\',\n updated_at: \'1970-01-01T00:00:00.000Z\',\n created_by: \'string\',\n org_id: \'string\',\n updated_by: \'string\',\n shared_with: [\'string\'],\n shared_with_org: true,\n owners: [\'string\'],\n config: {\n dataset: \'workflow_tasks_overview\',\n swimlanes: [\n {\n id: \'string\',\n title: \'Swimlane 1\',\n position: 1,\n filter: {\n items: [\n {\n key: \'assignee\',\n operator: \'EQUALS\',\n value: \'100020\',\n data_type: \'string\'\n }\n ],\n combination: \'OR\'\n },\n title_chip_variant: \'success\'\n }\n ],\n card_config: {\n fields: [\'assignee\']\n },\n board_filter: {\n items: [\n {\n key: \'assignee\',\n operator: \'EQUALS\',\n value: \'100020\',\n data_type: \'string\'\n }\n ],\n combination: \'OR\'\n },\n sorting: {\n field: \'created_at\',\n direction: \'asc\'\n },\n search_query: \'task 1\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "Board 1",\n "description": "Board description",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "org_id": "string",\n "updated_by": "string",\n "shared_with": ["string"],\n "shared_with_org": true,\n "owners": ["string"],\n "config": {\n "dataset": "workflow_tasks_overview",\n "swimlanes": [\n {\n "id": "string",\n "title": "Swimlane 1",\n "position": 1,\n "filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "title_chip_variant": "success"\n }\n ],\n "card_config": {\n "fields": ["assignee"]\n },\n "board_filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "sorting": {\n "field": "created_at",\n "direction": "asc"\n },\n "search_query": "task 1"\n }\n}\n```\n\n</details>\n\n---\n\n### `patchKanbanBoard`\n\nPartially updates fields of an existing Kanban board by ID.\n\n`PATCH /v1/kanban/board/{boardId}`\n\n```ts\nconst { data } = await client.patchKanbanBoard(\n {\n boardId: \'example\',\n },\n {\n title: \'Board 1\',\n description: \'Board description\',\n shared_with: [\'string\'],\n shared_with_org: true,\n owners: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "Board 1",\n "description": "Board description",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "org_id": "string",\n "updated_by": "string",\n "shared_with": ["string"],\n "shared_with_org": true,\n "owners": ["string"],\n "config": {\n "dataset": "workflow_tasks_overview",\n "swimlanes": [\n {\n "id": "string",\n "title": "Swimlane 1",\n "position": 1,\n "filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "title_chip_variant": "success"\n }\n ],\n "card_config": {\n "fields": ["assignee"]\n },\n "board_filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "sorting": {\n "field": "created_at",\n "direction": "asc"\n },\n "search_query": "task 1"\n }\n}\n```\n\n</details>\n\n---\n\n### `deleteKanbanBoard`\n\nPermanently deletes a Kanban board by ID. This action is irreversible.\n\n`DELETE /v1/kanban/board/{boardId}`\n\n```ts\nconst { data } = await client.deleteKanbanBoard({\n boardId: \'example\',\n})\n```\n\n---\n\n### `setDefaultKanbanBoard`\n\nSets a Kanban board as the default board for the organization.\n\n`PUT /v1/kanban/org/default-board`\n\n```ts\nconst { data } = await client.setDefaultKanbanBoard({\n boardId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "message": "string",\n "default_board_id": "string"\n}\n```\n\n</details>\n\n---\n\n### `clearDefaultKanbanBoard`\n\nRemoves the default board configuration for the organization.\n\n`DELETE /v1/kanban/org/default-board`\n\n```ts\nconst { data } = await client.clearDefaultKanbanBoard()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "message": "string",\n "default_board_id": "string"\n}\n```\n\n</details>\n\n---\n\n### `flowsAutocomplete`\n\nReturns autocomplete suggestions for a given attribute in the Flows dataset.\n\n`GET /v1/kanban/query/flows:autocomplete`\n\n```ts\nconst { data } = await client.flowsAutocomplete({\n input: \'example\',\n attribute: \'example\',\n size: 1,\n from: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": ["value"],\n "hits": 42\n}\n```\n\n</details>\n\n---\n\n### `executeFlowsQuery`\n\nExecutes a query against the Flows dataset and returns paginated results for use in Kanban card rendering.\n\n`POST /v1/kanban/query/flows:execute`\n\n```ts\nconst { data } = await client.executeFlowsQuery(\n null,\n {\n filters: {\n items: [\n {\n key: \'assignee\',\n operator: \'EQUALS\',\n value: \'100020\',\n data_type: \'string\'\n }\n ],\n combination: \'OR\'\n },\n sorting: {\n field: \'created_at\',\n direction: \'asc\'\n },\n from: 0,\n size: 10\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {}\n ],\n "hits": 42,\n "page_number": 1,\n "page_size": 10,\n "total_pages": 5\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `Error`\n\nStandard error response\n\n```ts\ntype Error = {\n message?: string\n status?: number\n}\n```\n\n### `BoardSummary`\n\nSummary representation of a Kanban board, returned in list responses. Does not include swimlane and filter configuration details.\n\n```ts\ntype BoardSummary = {\n id?: string\n title?: string\n description?: string\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n org_id?: string\n updated_by?: string\n shared_with?: string[]\n shared_with_org?: boolean\n owners?: string[]\n}\n```\n\n### `Board`\n\nFull representation of a Kanban board, including swimlane layout, filter configuration, card display fields, and sorting options.\n\n```ts\ntype Board = {\n id?: string\n title: string\n description?: string\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n org_id?: string\n updated_by?: string\n shared_with?: string[]\n shared_with_org?: boolean\n owners?: string[]\n config: {\n dataset?: string\n swimlanes?: Array<{\n id?: { ... }\n title?: { ... }\n position?: { ... }\n filter?: { ... }\n title_chip_variant?: { ... }\n }>\n card_config?: {\n fields?: { ... }\n }\n board_filter?: {\n items: { ... }\n combination: { ... }\n }\n sorting?: {\n field: { ... }\n direction?: { ... }\n }\n search_query?: string\n }\n}\n```\n\n### `Swimlane`\n\nA vertical column in a Kanban board that groups workflow tasks or entities matching its filter criteria. Each swimlane has an independent filter and a display position.\n\n```ts\ntype Swimlane = {\n id?: string\n title?: string\n position?: number\n filter?: {\n items: Array<{\n key: { ... }\n operator: { ... }\n value?: { ... }\n data_type?: { ... }\n } | {\n items: { ... }\n combination: { ... }\n }>\n combination: "AND" | "OR"\n }\n title_chip_variant?: string\n}\n```\n\n### `Sorting`\n\nDefines how query results should be sorted. Specify a field name and sort direction.\n\n```ts\ntype Sorting = {\n field: string\n direction?: "asc" | "desc"\n}\n```\n\n### `BoardFilter`\n\nA filter group containing one or more filter items or nested filter groups. Items are combined using the specified logical operator (AND/OR).\n\n```ts\ntype BoardFilter = {\n items: Array<{\n key: string\n operator: "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"\n value?: string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean[]\n data_type?: "string" | "number" | "boolean" | "date"\n } | {\n items: Array<{\n key: { ... }\n operator: { ... }\n value?: { ... }\n data_type?: { ... }\n }>\n combination: "AND" | "OR"\n }>\n combination: "AND" | "OR"\n}\n```\n\n### `FilterGroup`\n\n```ts\ntype FilterGroup = {\n items: Array<{\n key: string\n operator: "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"\n value?: string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean[]\n data_type?: "string" | "number" | "boolean" | "date"\n }>\n combination: "AND" | "OR"\n}\n```\n\n### `FilterOperator`\n\nThe comparison operator for filtering\n\n```ts\ntype FilterOperator = "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"\n```\n\n### `DynamicDateValue`\n\nDynamic date keywords that resolve to actual dates at runtime\n\n```ts\ntype DynamicDateValue = "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER"\n```\n\n### `ValueType`\n\nThe value to compare against - can be a single value (string, number, boolean, or dynamic date) or an array of values\n\n```ts\ntype ValueType = string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean[]\n```\n\n### `FlowsQueryRequest`\n\nRequest payload for executing a query against the Flows dataset. Supports filter conditions, sorting, and offset-based pagination.\n\n```ts\ntype FlowsQueryRequest = {\n filters?: {\n items: Array<{\n key: { ... }\n operator: { ... }\n value?: { ... }\n data_type?: { ... }\n } | {\n items: { ... }\n combination: { ... }\n }>\n combination: "AND" | "OR"\n }\n sorting?: {\n field: string\n direction?: "asc" | "desc"\n }\n from?: number\n size?: number\n}\n```\n\n### `FlowsQueryResult`\n\nPaginated result set returned from a Flows query. Each item in `results` is a workflow task record with dynamic fields depending on the dataset configuration.\n\n```ts\ntype FlowsQueryResult = {\n results?: Record<string, unknown>[]\n hits?: number\n page_number?: number\n page_size?: number\n total_pages?: number\n}\n```\n\n### `FilterItem`\n\n```ts\ntype FilterItem = {\n key: string\n operator: "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"\n value?: string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean[]\n data_type?: "string" | "number" | "boolean" | "date"\n}\n```\n';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = kanban_default;
|
package/dist/kanban-HI6LL5WY.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./chunk-YPSWSI3M.js";
|
|
2
|
-
|
|
3
|
-
// src/docs/kanban.json
|
|
4
|
-
var kanban_default = '# Kanban API\n\n- **Base URL:** `https://kanban.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/kanban](https://docs.epilot.io/api/kanban)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.kanban.createKanbanBoard(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/kanban\'\n\nconst kanbanClient = getClient()\nauthorize(kanbanClient, () => \'<token>\')\nconst { data } = await kanbanClient.createKanbanBoard(...)\n```\n\n## Operations\n\n**Kanban**\n- [`createKanbanBoard`](#createkanbanboard)\n- [`getKanbanBoards`](#getkanbanboards)\n- [`getKanbanBoard`](#getkanbanboard)\n- [`updateKanbanBoard`](#updatekanbanboard)\n- [`patchKanbanBoard`](#patchkanbanboard)\n- [`deleteKanbanBoard`](#deletekanbanboard)\n- [`setDefaultKanbanBoard`](#setdefaultkanbanboard)\n- [`clearDefaultKanbanBoard`](#cleardefaultkanbanboard)\n\n**Query**\n- [`flowsAutocomplete`](#flowsautocomplete)\n- [`executeFlowsQuery`](#executeflowsquery)\n\n**Schemas**\n- [`Error`](#error)\n- [`BoardSummary`](#boardsummary)\n- [`Board`](#board)\n- [`Swimlane`](#swimlane)\n- [`Sorting`](#sorting)\n- [`BoardFilter`](#boardfilter)\n- [`FilterGroup`](#filtergroup)\n- [`FilterOperator`](#filteroperator)\n- [`DynamicDateValue`](#dynamicdatevalue)\n- [`ValueType`](#valuetype)\n- [`FlowsQueryRequest`](#flowsqueryrequest)\n- [`FlowsQueryResult`](#flowsqueryresult)\n- [`FilterItem`](#filteritem)\n\n### `createKanbanBoard`\n\nCreates a new Kanban board with the provided configuration.\n\n`POST /v1/kanban/board`\n\n```ts\nconst { data } = await client.createKanbanBoard(\n null,\n {\n id: \'string\',\n title: \'Board 1\',\n description: \'Board description\',\n created_at: \'1970-01-01T00:00:00.000Z\',\n updated_at: \'1970-01-01T00:00:00.000Z\',\n created_by: \'string\',\n org_id: \'string\',\n updated_by: \'string\',\n shared_with: [\'string\'],\n shared_with_org: true,\n owners: [\'string\'],\n config: {\n dataset: \'workflow_tasks_overview\',\n swimlanes: [\n {\n id: \'string\',\n title: \'Swimlane 1\',\n position: 1,\n filter: {\n items: [\n {\n key: \'assignee\',\n operator: \'EQUALS\',\n value: \'100020\',\n data_type: \'string\'\n }\n ],\n combination: \'OR\'\n },\n title_chip_variant: \'success\'\n }\n ],\n card_config: {\n fields: [\'assignee\']\n },\n board_filter: {\n items: [\n {\n key: \'assignee\',\n operator: \'EQUALS\',\n value: \'100020\',\n data_type: \'string\'\n }\n ],\n combination: \'OR\'\n },\n sorting: {\n field: \'created_at\',\n direction: \'asc\'\n },\n search_query: \'task 1\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "Board 1",\n "description": "Board description",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "org_id": "string",\n "updated_by": "string",\n "shared_with": ["string"],\n "shared_with_org": true,\n "owners": ["string"],\n "config": {\n "dataset": "workflow_tasks_overview",\n "swimlanes": [\n {\n "id": "string",\n "title": "Swimlane 1",\n "position": 1,\n "filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "title_chip_variant": "success"\n }\n ],\n "card_config": {\n "fields": ["assignee"]\n },\n "board_filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "sorting": {\n "field": "created_at",\n "direction": "asc"\n },\n "search_query": "task 1"\n }\n}\n```\n\n</details>\n\n---\n\n### `getKanbanBoards`\n\nReturns a list of all Kanban boards accessible to the authenticated user.\n\n`GET /v1/kanban/boards`\n\n```ts\nconst { data } = await client.getKanbanBoards({\n filter: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "id": "string",\n "title": "Board 1",\n "description": "Board description",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "org_id": "string",\n "updated_by": "string",\n "shared_with": ["string"],\n "shared_with_org": true,\n "owners": ["string"]\n }\n]\n```\n\n</details>\n\n---\n\n### `getKanbanBoard`\n\nRetrieves a Kanban board by ID, including its full configuration (swimlanes, filters, sorting, card fields).\n\n`GET /v1/kanban/board/{boardId}`\n\n```ts\nconst { data } = await client.getKanbanBoard({\n boardId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "Board 1",\n "description": "Board description",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "org_id": "string",\n "updated_by": "string",\n "shared_with": ["string"],\n "shared_with_org": true,\n "owners": ["string"],\n "config": {\n "dataset": "workflow_tasks_overview",\n "swimlanes": [\n {\n "id": "string",\n "title": "Swimlane 1",\n "position": 1,\n "filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "title_chip_variant": "success"\n }\n ],\n "card_config": {\n "fields": ["assignee"]\n },\n "board_filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "sorting": {\n "field": "created_at",\n "direction": "asc"\n },\n "search_query": "task 1"\n }\n}\n```\n\n</details>\n\n---\n\n### `updateKanbanBoard`\n\nFully replaces the configuration of an existing Kanban board by ID.\n\n`PUT /v1/kanban/board/{boardId}`\n\n```ts\nconst { data } = await client.updateKanbanBoard(\n {\n boardId: \'example\',\n },\n {\n id: \'string\',\n title: \'Board 1\',\n description: \'Board description\',\n created_at: \'1970-01-01T00:00:00.000Z\',\n updated_at: \'1970-01-01T00:00:00.000Z\',\n created_by: \'string\',\n org_id: \'string\',\n updated_by: \'string\',\n shared_with: [\'string\'],\n shared_with_org: true,\n owners: [\'string\'],\n config: {\n dataset: \'workflow_tasks_overview\',\n swimlanes: [\n {\n id: \'string\',\n title: \'Swimlane 1\',\n position: 1,\n filter: {\n items: [\n {\n key: \'assignee\',\n operator: \'EQUALS\',\n value: \'100020\',\n data_type: \'string\'\n }\n ],\n combination: \'OR\'\n },\n title_chip_variant: \'success\'\n }\n ],\n card_config: {\n fields: [\'assignee\']\n },\n board_filter: {\n items: [\n {\n key: \'assignee\',\n operator: \'EQUALS\',\n value: \'100020\',\n data_type: \'string\'\n }\n ],\n combination: \'OR\'\n },\n sorting: {\n field: \'created_at\',\n direction: \'asc\'\n },\n search_query: \'task 1\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "Board 1",\n "description": "Board description",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "org_id": "string",\n "updated_by": "string",\n "shared_with": ["string"],\n "shared_with_org": true,\n "owners": ["string"],\n "config": {\n "dataset": "workflow_tasks_overview",\n "swimlanes": [\n {\n "id": "string",\n "title": "Swimlane 1",\n "position": 1,\n "filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "title_chip_variant": "success"\n }\n ],\n "card_config": {\n "fields": ["assignee"]\n },\n "board_filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "sorting": {\n "field": "created_at",\n "direction": "asc"\n },\n "search_query": "task 1"\n }\n}\n```\n\n</details>\n\n---\n\n### `patchKanbanBoard`\n\nPartially updates fields of an existing Kanban board by ID.\n\n`PATCH /v1/kanban/board/{boardId}`\n\n```ts\nconst { data } = await client.patchKanbanBoard(\n {\n boardId: \'example\',\n },\n {\n title: \'Board 1\',\n description: \'Board description\',\n shared_with: [\'string\'],\n shared_with_org: true,\n owners: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "Board 1",\n "description": "Board description",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "org_id": "string",\n "updated_by": "string",\n "shared_with": ["string"],\n "shared_with_org": true,\n "owners": ["string"],\n "config": {\n "dataset": "workflow_tasks_overview",\n "swimlanes": [\n {\n "id": "string",\n "title": "Swimlane 1",\n "position": 1,\n "filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "title_chip_variant": "success"\n }\n ],\n "card_config": {\n "fields": ["assignee"]\n },\n "board_filter": {\n "items": [\n {\n "key": "assignee",\n "operator": "EQUALS",\n "value": "100020",\n "data_type": "string"\n }\n ],\n "combination": "OR"\n },\n "sorting": {\n "field": "created_at",\n "direction": "asc"\n },\n "search_query": "task 1"\n }\n}\n```\n\n</details>\n\n---\n\n### `deleteKanbanBoard`\n\nPermanently deletes a Kanban board by ID. This action is irreversible.\n\n`DELETE /v1/kanban/board/{boardId}`\n\n```ts\nconst { data } = await client.deleteKanbanBoard({\n boardId: \'example\',\n})\n```\n\n---\n\n### `setDefaultKanbanBoard`\n\nSets a Kanban board as the default board for the organization.\n\n`PUT /v1/kanban/org/default-board`\n\n```ts\nconst { data } = await client.setDefaultKanbanBoard({\n boardId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "message": "string",\n "default_board_id": "string"\n}\n```\n\n</details>\n\n---\n\n### `clearDefaultKanbanBoard`\n\nRemoves the default board configuration for the organization.\n\n`DELETE /v1/kanban/org/default-board`\n\n```ts\nconst { data } = await client.clearDefaultKanbanBoard()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "message": "string",\n "default_board_id": "string"\n}\n```\n\n</details>\n\n---\n\n### `flowsAutocomplete`\n\nReturns autocomplete suggestions for a given attribute in the Flows dataset.\n\n`GET /v1/kanban/query/flows:autocomplete`\n\n```ts\nconst { data } = await client.flowsAutocomplete({\n input: \'example\',\n attribute: \'example\',\n size: 1,\n from: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": ["value"],\n "hits": 42\n}\n```\n\n</details>\n\n---\n\n### `executeFlowsQuery`\n\nExecutes a query against the Flows dataset and returns paginated results for use in Kanban card rendering.\n\n`POST /v1/kanban/query/flows:execute`\n\n```ts\nconst { data } = await client.executeFlowsQuery(\n null,\n {\n filters: {\n items: [\n {\n key: \'assignee\',\n operator: \'EQUALS\',\n value: \'100020\',\n data_type: \'string\'\n }\n ],\n combination: \'OR\'\n },\n sorting: {\n field: \'created_at\',\n direction: \'asc\'\n },\n from: 0,\n size: 10\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {}\n ],\n "hits": 42,\n "page_number": 1,\n "page_size": 10,\n "total_pages": 5\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `Error`\n\nStandard error response\n\n```ts\ntype Error = {\n message?: string\n status?: number\n}\n```\n\n### `BoardSummary`\n\nSummary representation of a Kanban board, returned in list responses. Does not include swimlane and filter configuration details.\n\n```ts\ntype BoardSummary = {\n id?: string\n title?: string\n description?: string\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n org_id?: string\n updated_by?: string\n shared_with?: string[]\n shared_with_org?: boolean\n owners?: string[]\n}\n```\n\n### `Board`\n\nFull representation of a Kanban board, including swimlane layout, filter configuration, card display fields, and sorting options.\n\n```ts\ntype Board = {\n id?: string\n title: string\n description?: string\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n org_id?: string\n updated_by?: string\n shared_with?: string[]\n shared_with_org?: boolean\n owners?: string[]\n config: {\n dataset?: string\n swimlanes?: Array<{\n id?: { ... }\n title?: { ... }\n position?: { ... }\n filter?: { ... }\n title_chip_variant?: { ... }\n }>\n card_config?: {\n fields?: { ... }\n }\n board_filter?: {\n items: { ... }\n combination: { ... }\n }\n sorting?: {\n field: { ... }\n direction?: { ... }\n }\n search_query?: string\n }\n}\n```\n\n### `Swimlane`\n\nA vertical column in a Kanban board that groups workflow tasks or entities matching its filter criteria. Each swimlane has an independent filter and a display position.\n\n```ts\ntype Swimlane = {\n id?: string\n title?: string\n position?: number\n filter?: {\n items: Array<{\n key: { ... }\n operator: { ... }\n value?: { ... }\n data_type?: { ... }\n } | {\n items: { ... }\n combination: { ... }\n }>\n combination: "AND" | "OR"\n }\n title_chip_variant?: string\n}\n```\n\n### `Sorting`\n\nDefines how query results should be sorted. Specify a field name and sort direction.\n\n```ts\ntype Sorting = {\n field: string\n direction?: "asc" | "desc"\n}\n```\n\n### `BoardFilter`\n\nA filter group containing one or more filter items or nested filter groups. Items are combined using the specified logical operator (AND/OR).\n\n```ts\ntype BoardFilter = {\n items: Array<{\n key: string\n operator: "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"\n value?: string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean[]\n data_type?: "string" | "number" | "boolean" | "date"\n } | {\n items: Array<{\n key: { ... }\n operator: { ... }\n value?: { ... }\n data_type?: { ... }\n }>\n combination: "AND" | "OR"\n }>\n combination: "AND" | "OR"\n}\n```\n\n### `FilterGroup`\n\n```ts\ntype FilterGroup = {\n items: Array<{\n key: string\n operator: "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"\n value?: string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean[]\n data_type?: "string" | "number" | "boolean" | "date"\n }>\n combination: "AND" | "OR"\n}\n```\n\n### `FilterOperator`\n\nThe comparison operator for filtering\n\n```ts\ntype FilterOperator = "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"\n```\n\n### `DynamicDateValue`\n\nDynamic date keywords that resolve to actual dates at runtime\n\n```ts\ntype DynamicDateValue = "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER"\n```\n\n### `ValueType`\n\nThe value to compare against - can be a single value (string, number, boolean, or dynamic date) or an array of values\n\n```ts\ntype ValueType = string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean[]\n```\n\n### `FlowsQueryRequest`\n\nRequest payload for executing a query against the Flows dataset. Supports filter conditions, sorting, and offset-based pagination.\n\n```ts\ntype FlowsQueryRequest = {\n filters?: {\n items: Array<{\n key: { ... }\n operator: { ... }\n value?: { ... }\n data_type?: { ... }\n } | {\n items: { ... }\n combination: { ... }\n }>\n combination: "AND" | "OR"\n }\n sorting?: {\n field: string\n direction?: "asc" | "desc"\n }\n from?: number\n size?: number\n}\n```\n\n### `FlowsQueryResult`\n\nPaginated result set returned from a Flows query. Each item in `results` is a workflow task record with dynamic fields depending on the dataset configuration.\n\n```ts\ntype FlowsQueryResult = {\n results?: Record<string, unknown>[]\n hits?: number\n page_number?: number\n page_size?: number\n total_pages?: number\n}\n```\n\n### `FilterItem`\n\n```ts\ntype FilterItem = {\n key: string\n operator: "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"\n value?: string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | "TODAY_OR_EARLIER" | number | boolean[]\n data_type?: "string" | "number" | "boolean" | "date"\n}\n```\n';
|
|
5
|
-
export {
|
|
6
|
-
kanban_default as default
|
|
7
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./chunk-YPSWSI3M.js";
|
|
2
|
-
|
|
3
|
-
// src/docs/permissions.json
|
|
4
|
-
var permissions_default = '# Permissions API\n\n- **Base URL:** `https://permissions.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/permissions](https://docs.epilot.io/api/permissions)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.permissions.listCurrentRoles(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/permissions\'\n\nconst permissionsClient = getClient()\nauthorize(permissionsClient, () => \'<token>\')\nconst { data } = await permissionsClient.listCurrentRoles(...)\n```\n\n## Operations\n\n**Roles**\n- [`listCurrentRoles`](#listcurrentroles)\n- [`listAllRoles`](#listallroles)\n- [`createRole`](#createrole)\n- [`searchRoles`](#searchroles)\n- [`getRole`](#getrole)\n- [`putRole`](#putrole)\n- [`deleteRole`](#deleterole)\n- [`refreshPermissions`](#refreshpermissions)\n\n**Assignments**\n- [`getAssignedRolesForUser`](#getassignedrolesforuser)\n- [`assignRoles`](#assignroles)\n- [`addAssignment`](#addassignment)\n- [`removeAssignment`](#removeassignment)\n- [`listAllAssignments`](#listallassignments)\n\n**Schemas**\n- [`Grant`](#grant)\n- [`GrantWithDependencies`](#grantwithdependencies)\n- [`GrantCondition`](#grantcondition)\n- [`EqualsCondition`](#equalscondition)\n- [`RoleId`](#roleid)\n- [`BaseRole`](#baserole)\n- [`BaseRoleForCreate`](#baseroleforcreate)\n- [`UserRole`](#userrole)\n- [`OrgRole`](#orgrole)\n- [`ShareRole`](#sharerole)\n- [`PartnerRole`](#partnerrole)\n- [`PortalRole`](#portalrole)\n- [`Role`](#role)\n- [`RolePayload`](#rolepayload)\n- [`Assignment`](#assignment)\n- [`InternalAssignment`](#internalassignment)\n- [`OrgAssignments`](#orgassignments)\n- [`OrgRoles`](#orgroles)\n- [`Assignments`](#assignments)\n- [`UserId`](#userid)\n- [`OrganizationId`](#organizationid)\n- [`Slug`](#slug)\n- [`RoleSearchInput`](#rolesearchinput)\n- [`CreateRolePayload`](#createrolepayload)\n- [`Error`](#error)\n\n### `listCurrentRoles`\n\nReturns roles and grants assigned to current user\n\n`GET /v1/permissions/me`\n\n```ts\nconst { data } = await client.listCurrentRoles()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "roles": [\n {\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `listAllRoles`\n\nReturns list of all roles in organization\n\n`GET /v1/permissions/roles`\n\n```ts\nconst { data } = await client.listAllRoles()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "roles": [\n {\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createRole`\n\nCreate role\n\n`POST /v1/permissions/roles`\n\n```ts\nconst { data } = await client.createRole(\n null,\n {},\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n}\n```\n\n</details>\n\n---\n\n### `searchRoles`\n\nSearch Roles\n\n`POST /v1/permissions/roles:search`\n\n```ts\nconst { data } = await client.searchRoles(\n null,\n {\n role_ids: [\'123:manager\', \'456:owner\'],\n org_ids: [\'123\', \'456\'],\n slugs: [\'manager\', \'owner\'],\n query: \'Administrator\',\n limit: 1,\n offset: 1\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getRole`\n\nGet role by id\n\n`GET /v1/permissions/roles/{roleId}`\n\n```ts\nconst { data } = await client.getRole({\n roleId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n}\n```\n\n</details>\n\n---\n\n### `putRole`\n\nCreate or update role\n\n`PUT /v1/permissions/roles/{roleId}`\n\n```ts\nconst { data } = await client.putRole(\n {\n roleId: \'example\',\n },\n {\n id: \'123:owner\',\n name: \'Owner\',\n slug: \'owner\',\n type: \'user_role\',\n expires_at: \'2028-07-21T17:32:28Z\',\n organization_id: \'123\',\n grants: [\n {\n action: \'entity-read\',\n resource: \'entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947\',\n effect: \'allow\',\n conditions: [\n {\n attribute: \'workflows.primary.task_name\',\n operation: \'equals\',\n values: [\'Qualification\']\n }\n ]\n }\n ],\n parent_role: \'123:owner\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n}\n```\n\n</details>\n\n---\n\n### `deleteRole`\n\nDelete role by id\n\n`DELETE /v1/permissions/roles/{roleId}`\n\n```ts\nconst { data } = await client.deleteRole({\n roleId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n}\n```\n\n</details>\n\n---\n\n### `refreshPermissions`\n\nMakes sure the user has a role in the organization\n\n`GET /v1/permissions/refresh`\n\n```ts\nconst { data } = await client.refreshPermissions()\n```\n\n---\n\n### `getAssignedRolesForUser`\n\nGet list of assigned roles by user id\n\n`GET /v1/permissions/assignments/{userId}`\n\n```ts\nconst { data } = await client.getAssignedRolesForUser({\n userId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n["123:owner"]\n```\n\n</details>\n\n---\n\n### `assignRoles`\n\nAssign / unassign roles to users.\n\n`PUT /v1/permissions/assignments/{userId}`\n\n```ts\nconst { data } = await client.assignRoles(\n {\n userId: \'example\',\n },\n [\'123:owner\'],\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n["123:owner"]\n```\n\n</details>\n\n---\n\n### `addAssignment`\n\nAssign a user to a role.\n\n`POST /v1/permissions/assignments/{userId}/{roleId}`\n\n```ts\nconst { data } = await client.addAssignment({\n userId: \'example\',\n roleId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "user_id": "1",\n "roles": ["123:owner"]\n}\n```\n\n</details>\n\n---\n\n### `removeAssignment`\n\nRemove role assignment from user\n\n`DELETE /v1/permissions/assignments/{userId}/{roleId}`\n\n```ts\nconst { data } = await client.removeAssignment({\n userId: \'example\',\n roleId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "user_id": "1",\n "roles": ["123:owner"]\n}\n```\n\n</details>\n\n---\n\n### `listAllAssignments`\n\nReturns list of all assignments in organization\n\n`GET /v1/permissions/assignments`\n\n```ts\nconst { data } = await client.listAllAssignments()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "assignments": [\n {\n "user_id": "1",\n "roles": ["123:owner"]\n }\n ]\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `Grant`\n\n```ts\ntype Grant = {\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n}\n```\n\n### `GrantWithDependencies`\n\n```ts\ntype GrantWithDependencies = {\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n dependencies?: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `GrantCondition`\n\n```ts\ntype GrantCondition = object\n```\n\n### `EqualsCondition`\n\nCheck if attribute equals to any of the values\n\n```ts\ntype EqualsCondition = {\n attribute: string\n operation: "equals"\n values: unknown[]\n}\n```\n\n### `RoleId`\n\nFormat: `<organization_id>`:`<slug>`\n\n```ts\ntype RoleId = string\n```\n\n### `BaseRole`\n\n```ts\ntype BaseRole = {\n id: string\n name: string\n slug: string\n type: string\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `BaseRoleForCreate`\n\n```ts\ntype BaseRoleForCreate = {\n id?: string\n name: string\n slug: string\n type: string\n expires_at?: string // date-time\n organization_id?: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `UserRole`\n\n```ts\ntype UserRole = {\n id: string\n name: string\n slug: string\n type: "user_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n parent_role?: object\n}\n```\n\n### `OrgRole`\n\n```ts\ntype OrgRole = {\n id: string\n name: string\n slug: string\n type: "org_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n pricing_tier?: string\n}\n```\n\n### `ShareRole`\n\n```ts\ntype ShareRole = {\n id: string\n name: string\n slug: string\n type: "share_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `PartnerRole`\n\n```ts\ntype PartnerRole = {\n id: string\n name: string\n slug: string\n type: "partner_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n partner_org_id?: object\n vendor_enforced_user_limit?: number\n}\n```\n\n### `PortalRole`\n\n```ts\ntype PortalRole = {\n id: string\n name: string\n slug: string\n type: "portal_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `Role`\n\n```ts\ntype Role = {\n id: string\n name: string\n slug: string\n type: "user_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n parent_role?: object\n} | {\n id: string\n name: string\n slug: string\n type: "org_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n pricing_tier?: string\n} | {\n id: string\n name: string\n slug: string\n type: "share_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n} | {\n id: string\n name: string\n slug: string\n type: "partner_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n partner_org_id?: object\n vendor_enforced_user_limit?: number\n} | {\n id: string\n name: string\n slug: string\n type: "portal_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `RolePayload`\n\n```ts\ntype RolePayload = {\n grants?: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n dependencies?: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n }>\n}\n```\n\n### `Assignment`\n\nA role attached to an user\n\n```ts\ntype Assignment = {\n user_id?: string\n roles?: string[]\n}\n```\n\n### `InternalAssignment`\n\nA role attached to an user\n\n```ts\ntype InternalAssignment = {\n userId?: string\n roles?: string[]\n}\n```\n\n### `OrgAssignments`\n\nAll roles attached to an users of an organization\n\n```ts\ntype OrgAssignments = {\n organizationId?: string\n assignments?: Array<{\n userId?: string\n roles?: string[]\n }>\n}\n```\n\n### `OrgRoles`\n\nAll roles attached to an users of an organization\n\n```ts\ntype OrgRoles = {\n organizationId?: string\n roles?: Array<{\n id: string\n name: string\n slug: string\n type: "user_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n parent_role?: object\n } | {\n id: string\n name: string\n slug: string\n type: "org_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n pricing_tier?: string\n } | {\n id: string\n name: string\n slug: string\n type: "share_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n } | {\n id: string\n name: string\n slug: string\n type: "partner_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n partner_org_id?: object\n vendor_enforced_user_limit?: number\n } | {\n id: string\n name: string\n slug: string\n type: "portal_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n }>\n}\n```\n\n### `Assignments`\n\nList of role ids attached to an user\n\n```ts\ntype Assignments = string[]\n```\n\n### `UserId`\n\nId of a user\n\n```ts\ntype UserId = string\n```\n\n### `OrganizationId`\n\nId of an organization\n\n```ts\ntype OrganizationId = string\n```\n\n### `Slug`\n\nSlug of a role; for a role with id = 123:manager -> 123 is org_id & manager is slug\n\n```ts\ntype Slug = string\n```\n\n### `RoleSearchInput`\n\n```ts\ntype RoleSearchInput = {\n role_ids?: string[]\n org_ids?: string[]\n slugs?: string[]\n query?: string\n limit?: number\n offset?: number\n}\n```\n\n### `CreateRolePayload`\n\n```ts\ntype CreateRolePayload = {\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n id?: string\n name: string\n slug: string\n type: string\n expires_at?: string // date-time\n organization_id?: string\n}\n```\n\n### `Error`\n\nError response\n\n```ts\ntype Error = {\n message: string\n}\n```\n';
|
|
5
|
-
export {
|
|
6
|
-
permissions_default as default
|
|
7
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
-
|
|
3
|
-
// src/docs/permissions.json
|
|
4
|
-
var permissions_default = '# Permissions API\n\n- **Base URL:** `https://permissions.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/permissions](https://docs.epilot.io/api/permissions)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.permissions.listCurrentRoles(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/permissions\'\n\nconst permissionsClient = getClient()\nauthorize(permissionsClient, () => \'<token>\')\nconst { data } = await permissionsClient.listCurrentRoles(...)\n```\n\n## Operations\n\n**Roles**\n- [`listCurrentRoles`](#listcurrentroles)\n- [`listAllRoles`](#listallroles)\n- [`createRole`](#createrole)\n- [`searchRoles`](#searchroles)\n- [`getRole`](#getrole)\n- [`putRole`](#putrole)\n- [`deleteRole`](#deleterole)\n- [`refreshPermissions`](#refreshpermissions)\n\n**Assignments**\n- [`getAssignedRolesForUser`](#getassignedrolesforuser)\n- [`assignRoles`](#assignroles)\n- [`addAssignment`](#addassignment)\n- [`removeAssignment`](#removeassignment)\n- [`listAllAssignments`](#listallassignments)\n\n**Schemas**\n- [`Grant`](#grant)\n- [`GrantWithDependencies`](#grantwithdependencies)\n- [`GrantCondition`](#grantcondition)\n- [`EqualsCondition`](#equalscondition)\n- [`RoleId`](#roleid)\n- [`BaseRole`](#baserole)\n- [`BaseRoleForCreate`](#baseroleforcreate)\n- [`UserRole`](#userrole)\n- [`OrgRole`](#orgrole)\n- [`ShareRole`](#sharerole)\n- [`PartnerRole`](#partnerrole)\n- [`PortalRole`](#portalrole)\n- [`Role`](#role)\n- [`RolePayload`](#rolepayload)\n- [`Assignment`](#assignment)\n- [`InternalAssignment`](#internalassignment)\n- [`OrgAssignments`](#orgassignments)\n- [`OrgRoles`](#orgroles)\n- [`Assignments`](#assignments)\n- [`UserId`](#userid)\n- [`OrganizationId`](#organizationid)\n- [`Slug`](#slug)\n- [`RoleSearchInput`](#rolesearchinput)\n- [`CreateRolePayload`](#createrolepayload)\n- [`Error`](#error)\n\n### `listCurrentRoles`\n\nReturns roles and grants assigned to current user\n\n`GET /v1/permissions/me`\n\n```ts\nconst { data } = await client.listCurrentRoles()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "roles": [\n {\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `listAllRoles`\n\nReturns list of all roles in organization\n\n`GET /v1/permissions/roles`\n\n```ts\nconst { data } = await client.listAllRoles()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "roles": [\n {\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createRole`\n\nCreate role\n\n`POST /v1/permissions/roles`\n\n```ts\nconst { data } = await client.createRole(\n null,\n {},\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n}\n```\n\n</details>\n\n---\n\n### `searchRoles`\n\nSearch Roles\n\n`POST /v1/permissions/roles:search`\n\n```ts\nconst { data } = await client.searchRoles(\n null,\n {\n role_ids: [\'123:manager\', \'456:owner\'],\n org_ids: [\'123\', \'456\'],\n slugs: [\'manager\', \'owner\'],\n query: \'Administrator\',\n limit: 1,\n offset: 1\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getRole`\n\nGet role by id\n\n`GET /v1/permissions/roles/{roleId}`\n\n```ts\nconst { data } = await client.getRole({\n roleId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n}\n```\n\n</details>\n\n---\n\n### `putRole`\n\nCreate or update role\n\n`PUT /v1/permissions/roles/{roleId}`\n\n```ts\nconst { data } = await client.putRole(\n {\n roleId: \'example\',\n },\n {\n id: \'123:owner\',\n name: \'Owner\',\n slug: \'owner\',\n type: \'user_role\',\n expires_at: \'2028-07-21T17:32:28Z\',\n organization_id: \'123\',\n grants: [\n {\n action: \'entity-read\',\n resource: \'entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947\',\n effect: \'allow\',\n conditions: [\n {\n attribute: \'workflows.primary.task_name\',\n operation: \'equals\',\n values: [\'Qualification\']\n }\n ]\n }\n ],\n parent_role: \'123:owner\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n}\n```\n\n</details>\n\n---\n\n### `deleteRole`\n\nDelete role by id\n\n`DELETE /v1/permissions/roles/{roleId}`\n\n```ts\nconst { data } = await client.deleteRole({\n roleId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "123:owner",\n "name": "Owner",\n "slug": "owner",\n "type": "user_role",\n "expires_at": "2028-07-21T17:32:28Z",\n "organization_id": "123",\n "grants": [\n {\n "action": "entity-read",\n "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",\n "effect": "allow",\n "conditions": [\n {\n "attribute": "workflows.primary.task_name",\n "operation": "equals",\n "values": ["Qualification"]\n }\n ]\n }\n ],\n "parent_role": "123:owner"\n}\n```\n\n</details>\n\n---\n\n### `refreshPermissions`\n\nMakes sure the user has a role in the organization\n\n`GET /v1/permissions/refresh`\n\n```ts\nconst { data } = await client.refreshPermissions()\n```\n\n---\n\n### `getAssignedRolesForUser`\n\nGet list of assigned roles by user id\n\n`GET /v1/permissions/assignments/{userId}`\n\n```ts\nconst { data } = await client.getAssignedRolesForUser({\n userId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n["123:owner"]\n```\n\n</details>\n\n---\n\n### `assignRoles`\n\nAssign / unassign roles to users.\n\n`PUT /v1/permissions/assignments/{userId}`\n\n```ts\nconst { data } = await client.assignRoles(\n {\n userId: \'example\',\n },\n [\'123:owner\'],\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n["123:owner"]\n```\n\n</details>\n\n---\n\n### `addAssignment`\n\nAssign a user to a role.\n\n`POST /v1/permissions/assignments/{userId}/{roleId}`\n\n```ts\nconst { data } = await client.addAssignment({\n userId: \'example\',\n roleId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "user_id": "1",\n "roles": ["123:owner"]\n}\n```\n\n</details>\n\n---\n\n### `removeAssignment`\n\nRemove role assignment from user\n\n`DELETE /v1/permissions/assignments/{userId}/{roleId}`\n\n```ts\nconst { data } = await client.removeAssignment({\n userId: \'example\',\n roleId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "user_id": "1",\n "roles": ["123:owner"]\n}\n```\n\n</details>\n\n---\n\n### `listAllAssignments`\n\nReturns list of all assignments in organization\n\n`GET /v1/permissions/assignments`\n\n```ts\nconst { data } = await client.listAllAssignments()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "assignments": [\n {\n "user_id": "1",\n "roles": ["123:owner"]\n }\n ]\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `Grant`\n\n```ts\ntype Grant = {\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n}\n```\n\n### `GrantWithDependencies`\n\n```ts\ntype GrantWithDependencies = {\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n dependencies?: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `GrantCondition`\n\n```ts\ntype GrantCondition = object\n```\n\n### `EqualsCondition`\n\nCheck if attribute equals to any of the values\n\n```ts\ntype EqualsCondition = {\n attribute: string\n operation: "equals"\n values: unknown[]\n}\n```\n\n### `RoleId`\n\nFormat: `<organization_id>`:`<slug>`\n\n```ts\ntype RoleId = string\n```\n\n### `BaseRole`\n\n```ts\ntype BaseRole = {\n id: string\n name: string\n slug: string\n type: string\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `BaseRoleForCreate`\n\n```ts\ntype BaseRoleForCreate = {\n id?: string\n name: string\n slug: string\n type: string\n expires_at?: string // date-time\n organization_id?: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `UserRole`\n\n```ts\ntype UserRole = {\n id: string\n name: string\n slug: string\n type: "user_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n parent_role?: object\n}\n```\n\n### `OrgRole`\n\n```ts\ntype OrgRole = {\n id: string\n name: string\n slug: string\n type: "org_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n pricing_tier?: string\n}\n```\n\n### `ShareRole`\n\n```ts\ntype ShareRole = {\n id: string\n name: string\n slug: string\n type: "share_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `PartnerRole`\n\n```ts\ntype PartnerRole = {\n id: string\n name: string\n slug: string\n type: "partner_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n partner_org_id?: object\n vendor_enforced_user_limit?: number\n}\n```\n\n### `PortalRole`\n\n```ts\ntype PortalRole = {\n id: string\n name: string\n slug: string\n type: "portal_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `Role`\n\n```ts\ntype Role = {\n id: string\n name: string\n slug: string\n type: "user_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n parent_role?: object\n} | {\n id: string\n name: string\n slug: string\n type: "org_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n pricing_tier?: string\n} | {\n id: string\n name: string\n slug: string\n type: "share_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n} | {\n id: string\n name: string\n slug: string\n type: "partner_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n partner_org_id?: object\n vendor_enforced_user_limit?: number\n} | {\n id: string\n name: string\n slug: string\n type: "portal_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n}\n```\n\n### `RolePayload`\n\n```ts\ntype RolePayload = {\n grants?: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n dependencies?: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n }>\n}\n```\n\n### `Assignment`\n\nA role attached to an user\n\n```ts\ntype Assignment = {\n user_id?: string\n roles?: string[]\n}\n```\n\n### `InternalAssignment`\n\nA role attached to an user\n\n```ts\ntype InternalAssignment = {\n userId?: string\n roles?: string[]\n}\n```\n\n### `OrgAssignments`\n\nAll roles attached to an users of an organization\n\n```ts\ntype OrgAssignments = {\n organizationId?: string\n assignments?: Array<{\n userId?: string\n roles?: string[]\n }>\n}\n```\n\n### `OrgRoles`\n\nAll roles attached to an users of an organization\n\n```ts\ntype OrgRoles = {\n organizationId?: string\n roles?: Array<{\n id: string\n name: string\n slug: string\n type: "user_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n parent_role?: object\n } | {\n id: string\n name: string\n slug: string\n type: "org_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n pricing_tier?: string\n } | {\n id: string\n name: string\n slug: string\n type: "share_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n } | {\n id: string\n name: string\n slug: string\n type: "partner_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n partner_org_id?: object\n vendor_enforced_user_limit?: number\n } | {\n id: string\n name: string\n slug: string\n type: "portal_role"\n expires_at?: string // date-time\n organization_id: string\n grants: Array<{\n action: { ... }\n resource?: { ... }\n effect?: { ... }\n conditions?: { ... }\n }>\n }>\n}\n```\n\n### `Assignments`\n\nList of role ids attached to an user\n\n```ts\ntype Assignments = string[]\n```\n\n### `UserId`\n\nId of a user\n\n```ts\ntype UserId = string\n```\n\n### `OrganizationId`\n\nId of an organization\n\n```ts\ntype OrganizationId = string\n```\n\n### `Slug`\n\nSlug of a role; for a role with id = 123:manager -> 123 is org_id & manager is slug\n\n```ts\ntype Slug = string\n```\n\n### `RoleSearchInput`\n\n```ts\ntype RoleSearchInput = {\n role_ids?: string[]\n org_ids?: string[]\n slugs?: string[]\n query?: string\n limit?: number\n offset?: number\n}\n```\n\n### `CreateRolePayload`\n\n```ts\ntype CreateRolePayload = {\n grants: Array<{\n action: string\n resource?: string\n effect?: "allow" | "deny"\n conditions?: object[]\n }>\n id?: string\n name: string\n slug: string\n type: string\n expires_at?: string // date-time\n organization_id?: string\n}\n```\n\n### `Error`\n\nError response\n\n```ts\ntype Error = {\n message: string\n}\n```\n';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = permissions_default;
|