@epilot/sdk 2.1.5 → 2.1.7

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 (119) hide show
  1. package/definitions/app.json +18 -6
  2. package/definitions/permissions.json +41 -6
  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.d.cts +2 -2
  13. package/dist/apis/app.d.ts +2 -2
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +6 -6
  18. package/dist/apis/automation.js +1 -1
  19. package/dist/apis/billing.cjs +6 -6
  20. package/dist/apis/billing.js +1 -1
  21. package/dist/apis/blueprint-manifest.cjs +6 -6
  22. package/dist/apis/blueprint-manifest.js +1 -1
  23. package/dist/apis/consent.cjs +6 -6
  24. package/dist/apis/consent.js +1 -1
  25. package/dist/apis/customer-portal.cjs +6 -6
  26. package/dist/apis/customer-portal.js +1 -1
  27. package/dist/apis/dashboard.cjs +6 -6
  28. package/dist/apis/dashboard.js +1 -1
  29. package/dist/apis/data-management.cjs +6 -6
  30. package/dist/apis/data-management.js +1 -1
  31. package/dist/apis/deduplication.cjs +6 -6
  32. package/dist/apis/deduplication.js +1 -1
  33. package/dist/apis/design.cjs +6 -6
  34. package/dist/apis/design.js +1 -1
  35. package/dist/apis/document.cjs +6 -6
  36. package/dist/apis/document.js +1 -1
  37. package/dist/apis/email-settings.cjs +6 -6
  38. package/dist/apis/email-settings.js +1 -1
  39. package/dist/apis/email-template.cjs +6 -6
  40. package/dist/apis/email-template.js +1 -1
  41. package/dist/apis/entity-mapping.cjs +6 -6
  42. package/dist/apis/entity-mapping.js +1 -1
  43. package/dist/apis/entity.cjs +6 -6
  44. package/dist/apis/entity.js +1 -1
  45. package/dist/apis/environments.cjs +6 -6
  46. package/dist/apis/environments.js +1 -1
  47. package/dist/apis/erp-integration.cjs +6 -6
  48. package/dist/apis/erp-integration.js +1 -1
  49. package/dist/apis/event-catalog.cjs +6 -6
  50. package/dist/apis/event-catalog.js +1 -1
  51. package/dist/apis/file.cjs +6 -6
  52. package/dist/apis/file.js +1 -1
  53. package/dist/apis/iban.cjs +6 -6
  54. package/dist/apis/iban.js +1 -1
  55. package/dist/apis/journey.cjs +6 -6
  56. package/dist/apis/journey.js +1 -1
  57. package/dist/apis/kanban.cjs +6 -6
  58. package/dist/apis/kanban.js +1 -1
  59. package/dist/apis/message.cjs +6 -6
  60. package/dist/apis/message.js +1 -1
  61. package/dist/apis/metering.cjs +6 -6
  62. package/dist/apis/metering.js +1 -1
  63. package/dist/apis/notes.cjs +6 -6
  64. package/dist/apis/notes.js +1 -1
  65. package/dist/apis/notification.cjs +6 -6
  66. package/dist/apis/notification.js +1 -1
  67. package/dist/apis/organization.cjs +6 -6
  68. package/dist/apis/organization.js +1 -1
  69. package/dist/apis/partner-directory.cjs +6 -6
  70. package/dist/apis/partner-directory.js +1 -1
  71. package/dist/apis/permissions.cjs +6 -6
  72. package/dist/apis/permissions.d.cts +2 -2
  73. package/dist/apis/permissions.d.ts +2 -2
  74. package/dist/apis/permissions.js +1 -1
  75. package/dist/apis/pricing-tier.cjs +6 -6
  76. package/dist/apis/pricing-tier.js +1 -1
  77. package/dist/apis/pricing.cjs +6 -6
  78. package/dist/apis/pricing.js +1 -1
  79. package/dist/apis/purpose.cjs +6 -6
  80. package/dist/apis/purpose.js +1 -1
  81. package/dist/apis/sandbox.cjs +6 -6
  82. package/dist/apis/sandbox.js +1 -1
  83. package/dist/apis/submission.cjs +6 -6
  84. package/dist/apis/submission.js +1 -1
  85. package/dist/apis/targeting.cjs +6 -6
  86. package/dist/apis/targeting.js +1 -1
  87. package/dist/apis/template-variables.cjs +6 -6
  88. package/dist/apis/template-variables.js +1 -1
  89. package/dist/apis/user.cjs +6 -6
  90. package/dist/apis/user.js +1 -1
  91. package/dist/apis/validation-rules.cjs +6 -6
  92. package/dist/apis/validation-rules.js +1 -1
  93. package/dist/apis/webhooks.cjs +6 -6
  94. package/dist/apis/webhooks.js +1 -1
  95. package/dist/apis/workflow-definition.cjs +6 -6
  96. package/dist/apis/workflow-definition.js +1 -1
  97. package/dist/apis/workflow.cjs +6 -6
  98. package/dist/apis/workflow.js +1 -1
  99. package/dist/app-5KSVSKDU.js +7 -0
  100. package/dist/app-PL3IOROO.cjs +7 -0
  101. package/dist/{app.d-BXy_QUym.d.cts → app.d-u7Dq42kU.d.cts} +6 -2
  102. package/dist/{app.d-BXy_QUym.d.ts → app.d-u7Dq42kU.d.ts} +6 -2
  103. package/dist/{chunk-IT6ZEZ5U.cjs → chunk-4LDVICOS.cjs} +2 -2
  104. package/dist/{chunk-JSOL6HWE.js → chunk-PITTHLH4.js} +2 -2
  105. package/dist/index.cjs +8 -8
  106. package/dist/index.d.cts +2 -2
  107. package/dist/index.d.ts +2 -2
  108. package/dist/index.js +1 -1
  109. package/dist/permissions-X3SJVSPC.js +7 -0
  110. package/dist/permissions-ZJHUIBWY.cjs +7 -0
  111. package/dist/{permissions.d-BHB1FFS5.d.ts → permissions.d-l6AT8SYP.d.cts} +31 -4
  112. package/dist/{permissions.d-BHB1FFS5.d.cts → permissions.d-l6AT8SYP.d.ts} +31 -4
  113. package/docs/app.md +24 -10
  114. package/docs/permissions.md +34 -9
  115. package/package.json +1 -1
  116. package/dist/app-IKHWU222.cjs +0 -7
  117. package/dist/app-VLM3SWKA.js +0 -7
  118. package/dist/permissions-4T3GFNB4.js +0 -7
  119. package/dist/permissions-FGBIJNN7.cjs +0 -7
@@ -0,0 +1,7 @@
1
+ import "./chunk-YPSWSI3M.js";
2
+
3
+ // src/docs/permissions.json
4
+ var permissions_default = '# Permissions API\n\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- [`EqualsCurrentUserCondition`](#equalscurrentusercondition)\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 "vendor_created": true\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 "vendor_created": true\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 "vendor_created": true\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 "vendor_created": true\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 "vendor_created": true\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 vendor_created: true\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 "vendor_created": true\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 "vendor_created": true\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### `EqualsCurrentUserCondition`\n\nCheck if any relation_user attribute on the entity contains the current user. When attribute is provided, only that specific attribute path is checked.\n\n```ts\ntype EqualsCurrentUserCondition = {\n attribute?: string\n operation: "equals_current_user"\n}\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 vendor_created?: boolean\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 vendor_created?: boolean\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 vendor_created?: boolean\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 vendor_created?: boolean\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 vendor_created?: boolean\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 vendor_created?: boolean\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
+ };
@@ -0,0 +1,7 @@
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- **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- [`EqualsCurrentUserCondition`](#equalscurrentusercondition)\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 "vendor_created": true\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 "vendor_created": true\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 "vendor_created": true\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 "vendor_created": true\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 "vendor_created": true\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 vendor_created: true\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 "vendor_created": true\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 "vendor_created": true\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### `EqualsCurrentUserCondition`\n\nCheck if any relation_user attribute on the entity contains the current user. When attribute is provided, only that specific attribute path is checked.\n\n```ts\ntype EqualsCurrentUserCondition = {\n attribute?: string\n operation: "equals_current_user"\n}\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 vendor_created?: boolean\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 vendor_created?: boolean\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 vendor_created?: boolean\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 vendor_created?: boolean\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 vendor_created?: boolean\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 vendor_created?: boolean\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;
@@ -1,8 +1,6 @@
1
1
  import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, OperationResponse } from 'openapi-client-axios';
2
2
 
3
3
  /* Auto-copied from permissions-client */
4
- /* eslint-disable */
5
-
6
4
 
7
5
 
8
6
  declare namespace Components {
@@ -124,6 +122,10 @@ declare namespace Components {
124
122
  * 123:owner
125
123
  */
126
124
  parent_role?: string;
125
+ /**
126
+ * Indicates whether this role was created by a vendor organization on behalf of the partner organization.
127
+ */
128
+ vendor_created?: boolean;
127
129
  /**
128
130
  * List of grants (permissions) applied to the role
129
131
  */
@@ -253,6 +255,10 @@ declare namespace Components {
253
255
  * 123
254
256
  */
255
257
  partner_org_id?: string;
258
+ /**
259
+ * Indicates whether this role was created by a vendor organization on behalf of the partner organization.
260
+ */
261
+ vendor_created?: boolean;
256
262
  /**
257
263
  * List of grants (permissions) applied to the role
258
264
  */
@@ -339,6 +345,18 @@ declare namespace Components {
339
345
  operation: "equals";
340
346
  values: any[];
341
347
  }
348
+ /**
349
+ * Check if any relation_user attribute on the entity contains the current user. When attribute is provided, only that specific attribute path is checked.
350
+ */
351
+ export interface EqualsCurrentUserCondition {
352
+ /**
353
+ * Optional JSON path to a specific user attribute. When omitted, all relation_user attributes on the entity are scanned.
354
+ * example:
355
+ * assignee.*.user_id
356
+ */
357
+ attribute?: string;
358
+ operation: "equals_current_user";
359
+ }
342
360
  /**
343
361
  * Error response
344
362
  */
@@ -367,7 +385,7 @@ declare namespace Components {
367
385
  /**
368
386
  * An additional condition that must be met for the grant
369
387
  */
370
- export type GrantCondition = /* An additional condition that must be met for the grant */ /* Check if attribute equals to any of the values */ EqualsCondition;
388
+ export type GrantCondition = /* An additional condition that must be met for the grant */ /* Check if attribute equals to any of the values */ EqualsCondition | /* Check if any relation_user attribute on the entity contains the current user. When attribute is provided, only that specific attribute path is checked. */ EqualsCurrentUserCondition;
371
389
  export interface GrantWithDependencies {
372
390
  /**
373
391
  * example:
@@ -534,6 +552,10 @@ declare namespace Components {
534
552
  * Maximum number of users that can be assigned this role (vendor-enforced limit, can only be set via internal auth)
535
553
  */
536
554
  vendor_enforced_user_limit?: number;
555
+ /**
556
+ * Indicates whether this role was created by a vendor organization on behalf of the partner organization.
557
+ */
558
+ vendor_created?: boolean;
537
559
  }
538
560
  /**
539
561
  * A role that is applied to end customers and installers using the Portals
@@ -753,6 +775,10 @@ declare namespace Components {
753
775
  * 123:owner
754
776
  */
755
777
  parent_role?: string;
778
+ /**
779
+ * Indicates whether this role was created by a vendor organization on behalf of the partner organization.
780
+ */
781
+ vendor_created?: boolean;
756
782
  }
757
783
  }
758
784
  }
@@ -1229,6 +1255,7 @@ type BaseRole = Components.Schemas.BaseRole;
1229
1255
  type BaseRoleForCreate = Components.Schemas.BaseRoleForCreate;
1230
1256
  type CreateRolePayload = Components.Schemas.CreateRolePayload;
1231
1257
  type EqualsCondition = Components.Schemas.EqualsCondition;
1258
+ type EqualsCurrentUserCondition = Components.Schemas.EqualsCurrentUserCondition;
1232
1259
  type Error = Components.Schemas.Error;
1233
1260
  type Grant = Components.Schemas.Grant;
1234
1261
  type GrantCondition = Components.Schemas.GrantCondition;
@@ -1249,4 +1276,4 @@ type Slug = Components.Schemas.Slug;
1249
1276
  type UserId = Components.Schemas.UserId;
1250
1277
  type UserRole = Components.Schemas.UserRole;
1251
1278
 
1252
- export { type Assignment as A, type BaseRole as B, type Client as C, type EqualsCondition as E, type Grant as G, type InternalAssignment as I, type OperationMethods as O, Paths as P, type Role as R, type ShareRole as S, type UserId as U, Components as a, type PathsDictionary as b, type Assignments as c, type BaseRoleForCreate as d, type CreateRolePayload as e, type Error as f, type GrantCondition as g, type GrantWithDependencies as h, type OrgAssignments as i, type OrgRole as j, type OrgRoles as k, type OrganizationId as l, type PartnerRole as m, type PortalRole as n, type RoleId as o, type RolePayload as p, type RoleSearchInput as q, type Slug as r, type UserRole as s };
1279
+ export { type Assignment as A, type BaseRole as B, type Client as C, type EqualsCondition as E, type Grant as G, type InternalAssignment as I, type OperationMethods as O, Paths as P, type Role as R, type ShareRole as S, type UserId as U, Components as a, type PathsDictionary as b, type Assignments as c, type BaseRoleForCreate as d, type CreateRolePayload as e, type EqualsCurrentUserCondition as f, type Error as g, type GrantCondition as h, type GrantWithDependencies as i, type OrgAssignments as j, type OrgRole as k, type OrgRoles as l, type OrganizationId as m, type PartnerRole as n, type PortalRole as o, type RoleId as p, type RolePayload as q, type RoleSearchInput as r, type Slug as s, type UserRole as t };
@@ -1,8 +1,6 @@
1
1
  import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, OperationResponse } from 'openapi-client-axios';
2
2
 
3
3
  /* Auto-copied from permissions-client */
4
- /* eslint-disable */
5
-
6
4
 
7
5
 
8
6
  declare namespace Components {
@@ -124,6 +122,10 @@ declare namespace Components {
124
122
  * 123:owner
125
123
  */
126
124
  parent_role?: string;
125
+ /**
126
+ * Indicates whether this role was created by a vendor organization on behalf of the partner organization.
127
+ */
128
+ vendor_created?: boolean;
127
129
  /**
128
130
  * List of grants (permissions) applied to the role
129
131
  */
@@ -253,6 +255,10 @@ declare namespace Components {
253
255
  * 123
254
256
  */
255
257
  partner_org_id?: string;
258
+ /**
259
+ * Indicates whether this role was created by a vendor organization on behalf of the partner organization.
260
+ */
261
+ vendor_created?: boolean;
256
262
  /**
257
263
  * List of grants (permissions) applied to the role
258
264
  */
@@ -339,6 +345,18 @@ declare namespace Components {
339
345
  operation: "equals";
340
346
  values: any[];
341
347
  }
348
+ /**
349
+ * Check if any relation_user attribute on the entity contains the current user. When attribute is provided, only that specific attribute path is checked.
350
+ */
351
+ export interface EqualsCurrentUserCondition {
352
+ /**
353
+ * Optional JSON path to a specific user attribute. When omitted, all relation_user attributes on the entity are scanned.
354
+ * example:
355
+ * assignee.*.user_id
356
+ */
357
+ attribute?: string;
358
+ operation: "equals_current_user";
359
+ }
342
360
  /**
343
361
  * Error response
344
362
  */
@@ -367,7 +385,7 @@ declare namespace Components {
367
385
  /**
368
386
  * An additional condition that must be met for the grant
369
387
  */
370
- export type GrantCondition = /* An additional condition that must be met for the grant */ /* Check if attribute equals to any of the values */ EqualsCondition;
388
+ export type GrantCondition = /* An additional condition that must be met for the grant */ /* Check if attribute equals to any of the values */ EqualsCondition | /* Check if any relation_user attribute on the entity contains the current user. When attribute is provided, only that specific attribute path is checked. */ EqualsCurrentUserCondition;
371
389
  export interface GrantWithDependencies {
372
390
  /**
373
391
  * example:
@@ -534,6 +552,10 @@ declare namespace Components {
534
552
  * Maximum number of users that can be assigned this role (vendor-enforced limit, can only be set via internal auth)
535
553
  */
536
554
  vendor_enforced_user_limit?: number;
555
+ /**
556
+ * Indicates whether this role was created by a vendor organization on behalf of the partner organization.
557
+ */
558
+ vendor_created?: boolean;
537
559
  }
538
560
  /**
539
561
  * A role that is applied to end customers and installers using the Portals
@@ -753,6 +775,10 @@ declare namespace Components {
753
775
  * 123:owner
754
776
  */
755
777
  parent_role?: string;
778
+ /**
779
+ * Indicates whether this role was created by a vendor organization on behalf of the partner organization.
780
+ */
781
+ vendor_created?: boolean;
756
782
  }
757
783
  }
758
784
  }
@@ -1229,6 +1255,7 @@ type BaseRole = Components.Schemas.BaseRole;
1229
1255
  type BaseRoleForCreate = Components.Schemas.BaseRoleForCreate;
1230
1256
  type CreateRolePayload = Components.Schemas.CreateRolePayload;
1231
1257
  type EqualsCondition = Components.Schemas.EqualsCondition;
1258
+ type EqualsCurrentUserCondition = Components.Schemas.EqualsCurrentUserCondition;
1232
1259
  type Error = Components.Schemas.Error;
1233
1260
  type Grant = Components.Schemas.Grant;
1234
1261
  type GrantCondition = Components.Schemas.GrantCondition;
@@ -1249,4 +1276,4 @@ type Slug = Components.Schemas.Slug;
1249
1276
  type UserId = Components.Schemas.UserId;
1250
1277
  type UserRole = Components.Schemas.UserRole;
1251
1278
 
1252
- export { type Assignment as A, type BaseRole as B, type Client as C, type EqualsCondition as E, type Grant as G, type InternalAssignment as I, type OperationMethods as O, Paths as P, type Role as R, type ShareRole as S, type UserId as U, Components as a, type PathsDictionary as b, type Assignments as c, type BaseRoleForCreate as d, type CreateRolePayload as e, type Error as f, type GrantCondition as g, type GrantWithDependencies as h, type OrgAssignments as i, type OrgRole as j, type OrgRoles as k, type OrganizationId as l, type PartnerRole as m, type PortalRole as n, type RoleId as o, type RolePayload as p, type RoleSearchInput as q, type Slug as r, type UserRole as s };
1279
+ export { type Assignment as A, type BaseRole as B, type Client as C, type EqualsCondition as E, type Grant as G, type InternalAssignment as I, type OperationMethods as O, Paths as P, type Role as R, type ShareRole as S, type UserId as U, Components as a, type PathsDictionary as b, type Assignments as c, type BaseRoleForCreate as d, type CreateRolePayload as e, type EqualsCurrentUserCondition as f, type Error as g, type GrantCondition as h, type GrantWithDependencies as i, type OrgAssignments as j, type OrgRole as k, type OrgRoles as l, type OrganizationId as m, type PartnerRole as n, type PortalRole as o, type RoleId as p, type RolePayload as q, type RoleSearchInput as r, type Slug as s, type UserRole as t };
package/docs/app.md CHANGED
@@ -399,7 +399,8 @@ const { data } = await client.getPublicConfiguration({
399
399
  },
400
400
  "blueprint_ref": {
401
401
  "manifest_id": "string",
402
- "job_id": "string"
402
+ "job_id": "string",
403
+ "source_blueprint_file": "string"
403
404
  },
404
405
  "latest_version": "string",
405
406
  "public": true,
@@ -519,7 +520,8 @@ const { data } = await client.getConfiguration({
519
520
  },
520
521
  "blueprint_ref": {
521
522
  "manifest_id": "string",
522
- "job_id": "string"
523
+ "job_id": "string",
524
+ "source_blueprint_file": "string"
523
525
  },
524
526
  "version_audit": {
525
527
  "created_at": "string",
@@ -877,7 +879,8 @@ const { data } = await client.listVersions({
877
879
  },
878
880
  "blueprint_ref": {
879
881
  "manifest_id": "string",
880
- "job_id": "string"
882
+ "job_id": "string",
883
+ "source_blueprint_file": "string"
881
884
  },
882
885
  "version_audit": {
883
886
  "created_at": "string",
@@ -992,7 +995,8 @@ const { data } = await client.getVersion({
992
995
  },
993
996
  "blueprint_ref": {
994
997
  "manifest_id": "string",
995
- "job_id": "string"
998
+ "job_id": "string",
999
+ "source_blueprint_file": "string"
996
1000
  },
997
1001
  "version_audit": {
998
1002
  "created_at": "string",
@@ -1328,7 +1332,8 @@ const { data } = await client.listInstallations({
1328
1332
  "role": "string",
1329
1333
  "blueprint_ref": {
1330
1334
  "manifest_id": "string",
1331
- "job_id": "string"
1335
+ "job_id": "string",
1336
+ "source_blueprint_file": "string"
1332
1337
  },
1333
1338
  "installation_audit": {
1334
1339
  "created_at": "string",
@@ -1407,7 +1412,8 @@ const { data } = await client.getInstallation({
1407
1412
  "role": "string",
1408
1413
  "blueprint_ref": {
1409
1414
  "manifest_id": "string",
1410
- "job_id": "string"
1415
+ "job_id": "string",
1416
+ "source_blueprint_file": "string"
1411
1417
  },
1412
1418
  "installation_audit": {
1413
1419
  "created_at": "string",
@@ -1496,7 +1502,8 @@ const { data } = await client.install(
1496
1502
  "role": "string",
1497
1503
  "blueprint_ref": {
1498
1504
  "manifest_id": "string",
1499
- "job_id": "string"
1505
+ "job_id": "string",
1506
+ "source_blueprint_file": "string"
1500
1507
  },
1501
1508
  "installation_audit": {
1502
1509
  "created_at": "string",
@@ -1614,7 +1621,8 @@ const { data } = await client.promoteVersion({
1614
1621
  "role": "string",
1615
1622
  "blueprint_ref": {
1616
1623
  "manifest_id": "string",
1617
- "job_id": "string"
1624
+ "job_id": "string",
1625
+ "source_blueprint_file": "string"
1618
1626
  },
1619
1627
  "installation_audit": {
1620
1628
  "created_at": "string",
@@ -1888,7 +1896,7 @@ type PortalBlockComponent = {
1888
1896
  app_url?: { ... }
1889
1897
  zip_url?: { ... }
1890
1898
  override_url?: { ... }
1891
- section?: { ... }
1899
+ supported_surfaces?: { ... }
1892
1900
  }
1893
1901
  }
1894
1902
  }
@@ -2721,7 +2729,7 @@ type PortalBlockSurfaceConfig = {
2721
2729
  app_url?: string
2722
2730
  zip_url?: string
2723
2731
  override_url?: string
2724
- section?: "main" | "footer"
2732
+ supported_surfaces?: "main" | "footer_inline" | "footer_left_absolute" | "footer_right_absolute"[]
2725
2733
  }
2726
2734
  ```
2727
2735
 
@@ -2907,6 +2915,7 @@ type ConfigurationVersion = {
2907
2915
  blueprint_ref?: {
2908
2916
  manifest_id?: string
2909
2917
  job_id?: string
2918
+ source_blueprint_file?: string
2910
2919
  }
2911
2920
  version_audit: {
2912
2921
  created_at?: string
@@ -2936,6 +2945,7 @@ type Grants = Array<{
2936
2945
  type BlueprintRef = {
2937
2946
  manifest_id?: string
2938
2947
  job_id?: string
2948
+ source_blueprint_file?: string
2939
2949
  }
2940
2950
  ```
2941
2951
 
@@ -2982,6 +2992,7 @@ type Installation = {
2982
2992
  blueprint_ref?: {
2983
2993
  manifest_id?: string
2984
2994
  job_id?: string
2995
+ source_blueprint_file?: string
2985
2996
  }
2986
2997
  installation_audit?: {
2987
2998
  created_at?: string
@@ -3053,6 +3064,7 @@ type PublicConfiguration = {
3053
3064
  blueprint_ref?: {
3054
3065
  manifest_id?: string
3055
3066
  job_id?: string
3067
+ source_blueprint_file?: string
3056
3068
  }
3057
3069
  latest_version?: string
3058
3070
  public?: boolean
@@ -3081,6 +3093,7 @@ type PublicConfiguration = {
3081
3093
  blueprint_ref?: {
3082
3094
  manifest_id?: { ... }
3083
3095
  job_id?: { ... }
3096
+ source_blueprint_file?: { ... }
3084
3097
  }
3085
3098
  version_audit: {
3086
3099
  created_at?: { ... }
@@ -3173,6 +3186,7 @@ type Configuration = {
3173
3186
  blueprint_ref?: {
3174
3187
  manifest_id?: string
3175
3188
  job_id?: string
3189
+ source_blueprint_file?: string
3176
3190
  }
3177
3191
  version_audit: {
3178
3192
  created_at?: string
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",