@approvio/api 0.0.1

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 (31) hide show
  1. package/README.md +80 -0
  2. package/generated/openapi/model/add-group-entities-request.ts +24 -0
  3. package/generated/openapi/model/and-rule.ts +35 -0
  4. package/generated/openapi/model/api-error-details-inner.ts +18 -0
  5. package/generated/openapi/model/api-error.ts +26 -0
  6. package/generated/openapi/model/approval-rule.ts +26 -0
  7. package/generated/openapi/model/can-vote-response.ts +24 -0
  8. package/generated/openapi/model/entity-membership-add.ts +22 -0
  9. package/generated/openapi/model/entity-membership-remove.ts +18 -0
  10. package/generated/openapi/model/entity-reference.ts +24 -0
  11. package/generated/openapi/model/group-create.ts +24 -0
  12. package/generated/openapi/model/group-membership.ts +26 -0
  13. package/generated/openapi/model/group-requirement-rule.ts +38 -0
  14. package/generated/openapi/model/group.ts +40 -0
  15. package/generated/openapi/model/index.ts +30 -0
  16. package/generated/openapi/model/list-group-entities-200-response.ts +20 -0
  17. package/generated/openapi/model/list-groups-200-response.ts +20 -0
  18. package/generated/openapi/model/list-users-200-response.ts +20 -0
  19. package/generated/openapi/model/list-workflows-200-response.ts +20 -0
  20. package/generated/openapi/model/models.ts +27 -0
  21. package/generated/openapi/model/or-rule.ts +35 -0
  22. package/generated/openapi/model/pagination.ts +28 -0
  23. package/generated/openapi/model/remove-group-entities-request.ts +24 -0
  24. package/generated/openapi/model/user-create.ts +28 -0
  25. package/generated/openapi/model/user-summary.ts +28 -0
  26. package/generated/openapi/model/user.ts +32 -0
  27. package/generated/openapi/model/vote-mode.ts +20 -0
  28. package/generated/openapi/model/workflow-create.ts +30 -0
  29. package/generated/openapi/model/workflow-vote-request.ts +26 -0
  30. package/generated/openapi/model/workflow.ts +46 -0
  31. package/package.json +24 -0
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # Approvio API
2
+
3
+ This repository contains the OpenAPI specification for the Approvio backend and the tooling to generate the TypeScript API client.
4
+
5
+ ## Getting Started
6
+
7
+ 1. **Install Dependencies:**
8
+
9
+ ```bash
10
+ yarn install
11
+ ```
12
+
13
+ 2. **Generate API Client:**
14
+
15
+ This command will generate the TypeScript API client in the `generated/openapi` directory.
16
+
17
+ ```bash
18
+ yarn generate:api
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ The generated API client can be consumed by other TypeScript/JavaScript projects.
24
+
25
+ ### Linting the OpenAPI Specification
26
+
27
+ To lint the `openapi.yaml` file and check for adherence to best practices and defined rules:
28
+
29
+ ```bash
30
+ yarn lint:api
31
+ ```
32
+
33
+ ## Linking and Publishing
34
+
35
+ ### Linking for Local Development
36
+
37
+ To link this package for local development in another project (e.g., `approvio-frontend`):
38
+
39
+ 1. Navigate to the `approvio-api` directory:
40
+
41
+ ```bash
42
+ cd approvio-api
43
+ ```
44
+
45
+ 2. Run `yarn link` to create a global symlink:
46
+
47
+ ```bash
48
+ yarn link
49
+ ```
50
+
51
+ 3. Navigate to your consuming project (e.g., `approvio-frontend`):
52
+
53
+ ```bash
54
+ cd ../approvio-frontend
55
+ ```
56
+
57
+ 4. Link the `approvio-api` package:
58
+
59
+ ```bash
60
+ yarn link @approvio/api
61
+ ```
62
+
63
+ Now, your consuming project will use the locally linked version of `@approvio/api`.
64
+
65
+ ### Publishing to NPM
66
+
67
+ To publish this package to an NPM registry:
68
+
69
+ 1. Ensure you are logged in to the correct NPM registry:
70
+
71
+ ```bash
72
+ yarn login
73
+ ```
74
+
75
+
76
+ 1. Run `yarn publish`:
77
+
78
+ ```bash
79
+ yarn publish
80
+ ```
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { EntityMembershipAdd } from './entity-membership-add';
13
+
14
+
15
+ /**
16
+ * Defines operations to add entities within a group
17
+ */
18
+ export interface AddGroupEntitiesRequest {
19
+ /**
20
+ * List of entities to add to the group.
21
+ */
22
+ entities: Array<EntityMembershipAdd>;
23
+ }
24
+
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ApprovalRule } from './approval-rule';
13
+
14
+
15
+ /**
16
+ * An AND rule requiring all nested rules to be satisfied.
17
+ */
18
+ export interface AndRule {
19
+ /**
20
+ * Rule type (AND)
21
+ */
22
+ type: AndRule.TypeEnum;
23
+ /**
24
+ * List of rules that must all be satisfied. Cannot be empty.
25
+ */
26
+ rules: Array<ApprovalRule>;
27
+ }
28
+ export namespace AndRule {
29
+ export type TypeEnum = 'AND';
30
+ export const TypeEnum = {
31
+ And: 'AND' as TypeEnum
32
+ };
33
+ }
34
+
35
+
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ export interface APIErrorDetailsInner {
15
+ field?: string;
16
+ message?: string;
17
+ }
18
+
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { APIErrorDetailsInner } from './api-error-details-inner';
13
+
14
+
15
+ export interface APIError {
16
+ /**
17
+ * Error code
18
+ */
19
+ code?: string;
20
+ /**
21
+ * Error message
22
+ */
23
+ message?: string;
24
+ details?: Array<APIErrorDetailsInner>;
25
+ }
26
+
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { AndRule } from './and-rule';
13
+ import { OrRule } from './or-rule';
14
+ import { GroupRequirementRule } from './group-requirement-rule';
15
+
16
+
17
+ /**
18
+ * Configuration of approval rules. Can be a boolean operator (AND/OR) combining nested rules, or a specific requirement (minimum count from a group).
19
+ */
20
+ /**
21
+ * @type ApprovalRule
22
+ * Configuration of approval rules. Can be a boolean operator (AND/OR) combining nested rules, or a specific requirement (minimum count from a group).
23
+ * @export
24
+ */
25
+ export type ApprovalRule = AndRule | GroupRequirementRule | OrRule;
26
+
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ export interface CanVoteResponse {
15
+ /**
16
+ * True if the authenticated entity can currently vote on the workflow, false otherwise.
17
+ */
18
+ canVote: boolean;
19
+ /**
20
+ * Indicates the voting status for the user on this workflow. Relevant only if \'canVote\' is true or if the user had voting rights previously.
21
+ */
22
+ voteStatus: string;
23
+ }
24
+
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { EntityReference } from './entity-reference';
13
+
14
+
15
+ export interface EntityMembershipAdd {
16
+ entity: EntityReference;
17
+ /**
18
+ * Role assigned to the entity within the group.
19
+ */
20
+ role: string;
21
+ }
22
+
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { EntityReference } from './entity-reference';
13
+
14
+
15
+ export interface EntityMembershipRemove {
16
+ entity: EntityReference;
17
+ }
18
+
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ export interface EntityReference {
15
+ /**
16
+ * The type of the entity being referenced.
17
+ */
18
+ entityType: string;
19
+ /**
20
+ * The unique identifier (UUID) of the entity.
21
+ */
22
+ entityId: string;
23
+ }
24
+
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ export interface GroupCreate {
15
+ /**
16
+ * Name of the group
17
+ */
18
+ name: string;
19
+ /**
20
+ * Description of the group
21
+ */
22
+ description?: string;
23
+ }
24
+
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { EntityReference } from './entity-reference';
13
+
14
+
15
+ export interface GroupMembership {
16
+ entity: EntityReference;
17
+ /**
18
+ * The role of the entity within the group.
19
+ */
20
+ role: string;
21
+ /**
22
+ * Timestamp when the entity was added to the group.
23
+ */
24
+ readonly addedAt: string;
25
+ }
26
+
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ /**
15
+ * Requires a minimum number of approvals from a specific group.
16
+ */
17
+ export interface GroupRequirementRule {
18
+ /**
19
+ * Rule type (GROUP_REQUIREMENT)
20
+ */
21
+ type: GroupRequirementRule.TypeEnum;
22
+ /**
23
+ * ID of the approver group.
24
+ */
25
+ groupId: string;
26
+ /**
27
+ * Minimum number of approvals required from the group. Must be at least 1.
28
+ */
29
+ minCount: number;
30
+ }
31
+ export namespace GroupRequirementRule {
32
+ export type TypeEnum = 'GROUP_REQUIREMENT';
33
+ export const TypeEnum = {
34
+ GroupRequirement: 'GROUP_REQUIREMENT' as TypeEnum
35
+ };
36
+ }
37
+
38
+
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ export interface Group {
15
+ /**
16
+ * Unique identifier for the group
17
+ */
18
+ id: string;
19
+ /**
20
+ * Name of the group
21
+ */
22
+ name: string;
23
+ /**
24
+ * Description of the group
25
+ */
26
+ description?: string;
27
+ /**
28
+ * Number of entities in the group
29
+ */
30
+ entitiesCount: number;
31
+ /**
32
+ * Creation timestamp
33
+ */
34
+ createdAt: string;
35
+ /**
36
+ * Last update timestamp
37
+ */
38
+ updatedAt: string;
39
+ }
40
+
@@ -0,0 +1,30 @@
1
+ // Auto-generated index file
2
+
3
+ export * from './workflow-create';
4
+ export * from './list-users-200-response';
5
+ export * from './group-create';
6
+ export * from './pagination';
7
+ export * from './and-rule';
8
+ export * from './entity-membership-add';
9
+ export * from './can-vote-response';
10
+ export * from './list-group-entities-200-response';
11
+ export * from './api-error';
12
+ export * from './approval-rule';
13
+ export * from './user';
14
+ export * from './user-create';
15
+ export * from './workflow-vote-request';
16
+ export * from './api-error-details-inner';
17
+ export * from './remove-group-entities-request';
18
+ export * from './add-group-entities-request';
19
+ export * from './models';
20
+ export * from './group';
21
+ export * from './group-requirement-rule';
22
+ export * from './list-workflows-200-response';
23
+ export * from './group-membership';
24
+ export * from './list-groups-200-response';
25
+ export * from './vote-mode';
26
+ export * from './entity-membership-remove';
27
+ export * from './workflow';
28
+ export * from './or-rule';
29
+ export * from './user-summary';
30
+ export * from './entity-reference';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Pagination } from './pagination';
13
+ import { GroupMembership } from './group-membership';
14
+
15
+
16
+ export interface ListGroupEntities200Response {
17
+ entities: Array<GroupMembership>;
18
+ pagination: Pagination;
19
+ }
20
+
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Group } from './group';
13
+ import { Pagination } from './pagination';
14
+
15
+
16
+ export interface ListGroups200Response {
17
+ groups: Array<Group>;
18
+ pagination: Pagination;
19
+ }
20
+
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Pagination } from './pagination';
13
+ import { UserSummary } from './user-summary';
14
+
15
+
16
+ export interface ListUsers200Response {
17
+ users: Array<UserSummary>;
18
+ pagination: Pagination;
19
+ }
20
+
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Pagination } from './pagination';
13
+ import { Workflow } from './workflow';
14
+
15
+
16
+ export interface ListWorkflows200Response {
17
+ data: Array<Workflow>;
18
+ pagination: Pagination;
19
+ }
20
+
@@ -0,0 +1,27 @@
1
+ export * from './api-error';
2
+ export * from './api-error-details-inner';
3
+ export * from './add-group-entities-request';
4
+ export * from './and-rule';
5
+ export * from './approval-rule';
6
+ export * from './can-vote-response';
7
+ export * from './entity-membership-add';
8
+ export * from './entity-membership-remove';
9
+ export * from './entity-reference';
10
+ export * from './group';
11
+ export * from './group-create';
12
+ export * from './group-membership';
13
+ export * from './group-requirement-rule';
14
+ export * from './list-group-entities-200-response';
15
+ export * from './list-groups-200-response';
16
+ export * from './list-users-200-response';
17
+ export * from './list-workflows-200-response';
18
+ export * from './or-rule';
19
+ export * from './pagination';
20
+ export * from './remove-group-entities-request';
21
+ export * from './user';
22
+ export * from './user-create';
23
+ export * from './user-summary';
24
+ export * from './vote-mode';
25
+ export * from './workflow';
26
+ export * from './workflow-create';
27
+ export * from './workflow-vote-request';
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ApprovalRule } from './approval-rule';
13
+
14
+
15
+ /**
16
+ * An OR rule requiring at least one of the nested rules to be satisfied.
17
+ */
18
+ export interface OrRule {
19
+ /**
20
+ * Rule type (OR)
21
+ */
22
+ type: OrRule.TypeEnum;
23
+ /**
24
+ * List of rules where at least one must be satisfied. Cannot be empty.
25
+ */
26
+ rules: Array<ApprovalRule>;
27
+ }
28
+ export namespace OrRule {
29
+ export type TypeEnum = 'OR';
30
+ export const TypeEnum = {
31
+ Or: 'OR' as TypeEnum
32
+ };
33
+ }
34
+
35
+
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ export interface Pagination {
15
+ /**
16
+ * Total number of items
17
+ */
18
+ total: number;
19
+ /**
20
+ * Current page number
21
+ */
22
+ page: number;
23
+ /**
24
+ * Items per page
25
+ */
26
+ limit: number;
27
+ }
28
+
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { EntityMembershipRemove } from './entity-membership-remove';
13
+
14
+
15
+ /**
16
+ * Defines operations to remove entities within a group
17
+ */
18
+ export interface RemoveGroupEntitiesRequest {
19
+ /**
20
+ * List of entities to remove from the group.
21
+ */
22
+ entities: Array<EntityMembershipRemove>;
23
+ }
24
+
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ export interface UserCreate {
15
+ /**
16
+ * User\'s display name.
17
+ */
18
+ displayName: string;
19
+ /**
20
+ * User\'s email address (must be unique).
21
+ */
22
+ email: string;
23
+ /**
24
+ * Role assigned to the user within the group.
25
+ */
26
+ orgRole: string;
27
+ }
28
+
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ export interface UserSummary {
15
+ /**
16
+ * Internal unique identifier for the user.
17
+ */
18
+ readonly id: string;
19
+ /**
20
+ * User\'s display name.
21
+ */
22
+ displayName: string;
23
+ /**
24
+ * User\'s email address.
25
+ */
26
+ email: string;
27
+ }
28
+
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ export interface User {
15
+ /**
16
+ * Internal unique identifier for the user.
17
+ */
18
+ readonly id: string;
19
+ /**
20
+ * User\'s display name.
21
+ */
22
+ displayName: string;
23
+ /**
24
+ * User\'s email address.
25
+ */
26
+ email: string;
27
+ /**
28
+ * Timestamp when the user was created.
29
+ */
30
+ readonly createdAt: string;
31
+ }
32
+
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+
14
+ export interface VoteMode {
15
+ /**
16
+ * Specifies the mode of voting. VOTE_FOR_ALL means the vote applies based on the user\'s direct eligibility. VOTE_FOR_GROUPS (future) would imply voting on behalf of specific groups.
17
+ */
18
+ type: string;
19
+ }
20
+
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ApprovalRule } from './approval-rule';
13
+
14
+
15
+ export interface WorkflowCreate {
16
+ /**
17
+ * User-friendly name for the workflow
18
+ */
19
+ name: string;
20
+ /**
21
+ * Detailed description of the workflow
22
+ */
23
+ description?: string;
24
+ /**
25
+ * Additional custom metadata for the workflow
26
+ */
27
+ metadata?: object;
28
+ approvalRule: ApprovalRule;
29
+ }
30
+
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { VoteMode } from './vote-mode';
13
+
14
+
15
+ export interface WorkflowVoteRequest {
16
+ /**
17
+ * The type of vote to cast.
18
+ */
19
+ voteType: string;
20
+ voteMode: VoteMode;
21
+ /**
22
+ * Optional reason for the vote. Can be used for approval comments or decline reasons.
23
+ */
24
+ reason?: string;
25
+ }
26
+
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Workflow Approval System API
3
+ * API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ApprovalRule } from './approval-rule';
13
+
14
+
15
+ export interface Workflow {
16
+ /**
17
+ * Unique identifier for the workflow
18
+ */
19
+ id: string;
20
+ /**
21
+ * User-friendly name for the workflow
22
+ */
23
+ name: string;
24
+ /**
25
+ * Detailed description of the workflow
26
+ */
27
+ description?: string;
28
+ /**
29
+ * Current status of the workflow
30
+ */
31
+ status: string;
32
+ approvalRule: ApprovalRule;
33
+ /**
34
+ * Additional custom metadata for the workflow
35
+ */
36
+ metadata: object;
37
+ /**
38
+ * Creation timestamp
39
+ */
40
+ createdAt: string;
41
+ /**
42
+ * Last update timestamp
43
+ */
44
+ updatedAt: string;
45
+ }
46
+
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@approvio/api",
3
+ "author": "Giovanni Baratta",
4
+ "license": "MIT",
5
+ "version": "0.0.1",
6
+ "private": false,
7
+ "files": [
8
+ "generated/openapi/model"
9
+ ],
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/giovannibaratta/approvio-api"
13
+ },
14
+ "scripts": {
15
+ "generate:api": "openapi-generator-cli generate --openapitools openapitools.json && yarn generate:index",
16
+ "generate:index": "./scripts/generate-index.sh",
17
+ "lint:api": "spectral lint openapi.yaml --ruleset .spectral.yaml"
18
+ },
19
+ "devDependencies": {
20
+ "@openapitools/openapi-generator-cli": "2.20.2",
21
+ "@stoplight/spectral-cli": "6.15.0"
22
+ },
23
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
24
+ }