@approvio/api 0.0.45 → 0.0.47
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/README.md +11 -10
- package/dist/mocks/index.cjs +46 -23
- package/dist/mocks/index.d.cts +3 -2
- package/dist/mocks/index.d.mts +3 -2
- package/dist/mocks/index.mjs +46 -24
- package/dist/src/index.cjs +283 -199
- package/dist/src/index.d.cts +124 -215
- package/dist/src/index.d.mts +124 -215
- package/dist/src/index.mjs +270 -200
- package/dist/{workflow-create-CC-JYERf.d.mts → workflow-create-CHJBdnEj.d.cts} +162 -23
- package/dist/{workflow-create-i3n3vy4V.d.cts → workflow-create-DBQ7ekaO.d.mts} +162 -23
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -62,18 +62,19 @@ Now, your consuming project will use the locally linked version of `@approvio/ap
|
|
|
62
62
|
|
|
63
63
|
### Publishing to NPM
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
This package is automatically published to NPM when the version in `package.json` is incremented and merged into the `main` branch.
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
#### Automatic Publishing
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
yarn login
|
|
71
|
-
```
|
|
69
|
+
The [GitHub Workflow](.github/workflows/publish.yml) performs the following steps:
|
|
72
70
|
|
|
73
|
-
1.
|
|
71
|
+
1. Detects changes in the `main` branch.
|
|
72
|
+
2. Compares the version in `package.json` with the latest version published on NPM.
|
|
73
|
+
3. If the version is newer, it builds the project and publishes it automatically.
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
#### Manual Publishing
|
|
76
|
+
|
|
77
|
+
If you need to publish manually:
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
1. Ensure you are logged in to NPM: `npm login`
|
|
80
|
+
2. Run the publish command: `npm publish --access public`
|
package/dist/mocks/index.cjs
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
//#region mocks/user.fixtures.ts
|
|
3
|
-
const MOCK_USER_ID = "e6e08687-2189-4710-91b5-479cd25a9119";
|
|
4
|
-
const MOCK_ADMIN_USER_ID = "2d099b40-099f-4975-9320-e52aacfaccd6";
|
|
5
|
-
const memberUserResponse = {
|
|
6
|
-
id: MOCK_USER_ID,
|
|
7
|
-
displayName: "Test User",
|
|
8
|
-
email: "test@localhost.com",
|
|
9
|
-
orgRole: "member",
|
|
10
|
-
createdAt: "2026-03-08T12:00:00Z"
|
|
11
|
-
};
|
|
12
|
-
const adminUserResponse = {
|
|
13
|
-
id: MOCK_ADMIN_USER_ID,
|
|
14
|
-
displayName: "Admin User",
|
|
15
|
-
email: "admin@localhost.com",
|
|
16
|
-
orgRole: "admin",
|
|
17
|
-
createdAt: "2026-03-08T12:00:00Z"
|
|
18
|
-
};
|
|
19
|
-
const userSummaryResponse = {
|
|
20
|
-
id: memberUserResponse.id,
|
|
21
|
-
displayName: memberUserResponse.displayName,
|
|
22
|
-
email: memberUserResponse.email
|
|
23
|
-
};
|
|
24
|
-
//#endregion
|
|
25
2
|
//#region mocks/pagination.fixture.ts
|
|
26
3
|
/**
|
|
27
4
|
* Mock a Pagination response with a single element
|
|
@@ -79,6 +56,51 @@ const singleItemListGroupsResponse = {
|
|
|
79
56
|
pagination: singleItemPaginationResponse
|
|
80
57
|
};
|
|
81
58
|
//#endregion
|
|
59
|
+
//#region mocks/user.fixtures.ts
|
|
60
|
+
const MOCK_USER_ID = "e6e08687-2189-4710-91b5-479cd25a9119";
|
|
61
|
+
const MOCK_ADMIN_USER_ID = "2d099b40-099f-4975-9320-e52aacfaccd6";
|
|
62
|
+
const memberUserResponse = {
|
|
63
|
+
id: MOCK_USER_ID,
|
|
64
|
+
displayName: "Test User",
|
|
65
|
+
email: "test@localhost.com",
|
|
66
|
+
orgRole: "member",
|
|
67
|
+
createdAt: "2026-03-08T12:00:00Z",
|
|
68
|
+
groups: [],
|
|
69
|
+
roles: [],
|
|
70
|
+
concurrencyControl: { version: "1" }
|
|
71
|
+
};
|
|
72
|
+
const adminUserResponse = {
|
|
73
|
+
id: MOCK_ADMIN_USER_ID,
|
|
74
|
+
displayName: "Admin User",
|
|
75
|
+
email: "admin@localhost.com",
|
|
76
|
+
orgRole: "admin",
|
|
77
|
+
createdAt: "2026-03-08T12:00:00Z",
|
|
78
|
+
groups: [],
|
|
79
|
+
roles: [],
|
|
80
|
+
concurrencyControl: { version: "1" }
|
|
81
|
+
};
|
|
82
|
+
const userSummaryResponse = {
|
|
83
|
+
id: memberUserResponse.id,
|
|
84
|
+
displayName: memberUserResponse.displayName,
|
|
85
|
+
email: memberUserResponse.email
|
|
86
|
+
};
|
|
87
|
+
const userWithGroupsAndRolesResponse = {
|
|
88
|
+
id: "f3c8b4df-6d75-4309-844a-9c7efc8bf141",
|
|
89
|
+
displayName: "User with Groups and Roles",
|
|
90
|
+
email: "groups-roles@localhost.com",
|
|
91
|
+
orgRole: "member",
|
|
92
|
+
createdAt: "2026-03-08T12:00:00Z",
|
|
93
|
+
groups: [{
|
|
94
|
+
groupId: MOCK_GROUP_ID,
|
|
95
|
+
groupName: "Engineering Team"
|
|
96
|
+
}],
|
|
97
|
+
roles: [{
|
|
98
|
+
roleName: "SpaceManager",
|
|
99
|
+
scope: { type: "org" }
|
|
100
|
+
}],
|
|
101
|
+
concurrencyControl: { version: "1" }
|
|
102
|
+
};
|
|
103
|
+
//#endregion
|
|
82
104
|
//#region mocks/workflow.fixtures.ts
|
|
83
105
|
const MOCK_WORKFLOW_ID = "af20e7fc-66c0-420e-8f35-bf5c1071e6a9";
|
|
84
106
|
const MOCK_WORKFLOW_TEMPLATE_ID = "5932b816-16de-4334-a85c-f32315a6a49d";
|
|
@@ -133,5 +155,6 @@ exports.singleItemPaginationResponse = singleItemPaginationResponse;
|
|
|
133
155
|
exports.singlePagePaginationResponse = singlePagePaginationResponse;
|
|
134
156
|
exports.tokenResponse = tokenResponse;
|
|
135
157
|
exports.userSummaryResponse = userSummaryResponse;
|
|
158
|
+
exports.userWithGroupsAndRolesResponse = userWithGroupsAndRolesResponse;
|
|
136
159
|
exports.workflowCreateResponse = workflowCreateResponse;
|
|
137
160
|
exports.workflowResponse = workflowResponse;
|
package/dist/mocks/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Workflow, d as UserSummary, f as ListGroups200Response,
|
|
1
|
+
import { a as Workflow, d as UserSummary, f as ListGroups200Response, i as ListWorkflows200Response, m as Group, n as User, p as Pagination, r as TokenResponse, t as WorkflowCreate, x as GroupInfo } from "../workflow-create-CHJBdnEj.cjs";
|
|
2
2
|
|
|
3
3
|
//#region mocks/user.fixtures.d.ts
|
|
4
4
|
declare const MOCK_USER_ID = "e6e08687-2189-4710-91b5-479cd25a9119";
|
|
@@ -6,6 +6,7 @@ declare const MOCK_ADMIN_USER_ID = "2d099b40-099f-4975-9320-e52aacfaccd6";
|
|
|
6
6
|
declare const memberUserResponse: User;
|
|
7
7
|
declare const adminUserResponse: User;
|
|
8
8
|
declare const userSummaryResponse: UserSummary;
|
|
9
|
+
declare const userWithGroupsAndRolesResponse: User;
|
|
9
10
|
//#endregion
|
|
10
11
|
//#region mocks/group.fixtures.d.ts
|
|
11
12
|
declare const MOCK_GROUP_ID = "3d3f1904-3c8e-497c-9829-f0b3508e1481";
|
|
@@ -41,4 +42,4 @@ declare const multiPagePaginationResponse: Pagination;
|
|
|
41
42
|
*/
|
|
42
43
|
declare const exhaustedPaginationResponses: Pagination[];
|
|
43
44
|
//#endregion
|
|
44
|
-
export { MOCK_ADMIN_USER_ID, MOCK_GROUP_ID, MOCK_USER_ID, MOCK_WORKFLOW_ID, MOCK_WORKFLOW_TEMPLATE_ID, adminUserResponse, exhaustedPaginationResponses, groupInfoResponse, groupResponse, memberUserResponse, multiPagePaginationResponse, singleItemListGroupsResponse, singleItemListWorkflowsResponse, singleItemPaginationResponse, singlePagePaginationResponse, tokenResponse, userSummaryResponse, workflowCreateResponse, workflowResponse };
|
|
45
|
+
export { MOCK_ADMIN_USER_ID, MOCK_GROUP_ID, MOCK_USER_ID, MOCK_WORKFLOW_ID, MOCK_WORKFLOW_TEMPLATE_ID, adminUserResponse, exhaustedPaginationResponses, groupInfoResponse, groupResponse, memberUserResponse, multiPagePaginationResponse, singleItemListGroupsResponse, singleItemListWorkflowsResponse, singleItemPaginationResponse, singlePagePaginationResponse, tokenResponse, userSummaryResponse, userWithGroupsAndRolesResponse, workflowCreateResponse, workflowResponse };
|
package/dist/mocks/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Workflow, d as UserSummary, f as ListGroups200Response,
|
|
1
|
+
import { a as Workflow, d as UserSummary, f as ListGroups200Response, i as ListWorkflows200Response, m as Group, n as User, p as Pagination, r as TokenResponse, t as WorkflowCreate, x as GroupInfo } from "../workflow-create-DBQ7ekaO.mjs";
|
|
2
2
|
|
|
3
3
|
//#region mocks/user.fixtures.d.ts
|
|
4
4
|
declare const MOCK_USER_ID = "e6e08687-2189-4710-91b5-479cd25a9119";
|
|
@@ -6,6 +6,7 @@ declare const MOCK_ADMIN_USER_ID = "2d099b40-099f-4975-9320-e52aacfaccd6";
|
|
|
6
6
|
declare const memberUserResponse: User;
|
|
7
7
|
declare const adminUserResponse: User;
|
|
8
8
|
declare const userSummaryResponse: UserSummary;
|
|
9
|
+
declare const userWithGroupsAndRolesResponse: User;
|
|
9
10
|
//#endregion
|
|
10
11
|
//#region mocks/group.fixtures.d.ts
|
|
11
12
|
declare const MOCK_GROUP_ID = "3d3f1904-3c8e-497c-9829-f0b3508e1481";
|
|
@@ -41,4 +42,4 @@ declare const multiPagePaginationResponse: Pagination;
|
|
|
41
42
|
*/
|
|
42
43
|
declare const exhaustedPaginationResponses: Pagination[];
|
|
43
44
|
//#endregion
|
|
44
|
-
export { MOCK_ADMIN_USER_ID, MOCK_GROUP_ID, MOCK_USER_ID, MOCK_WORKFLOW_ID, MOCK_WORKFLOW_TEMPLATE_ID, adminUserResponse, exhaustedPaginationResponses, groupInfoResponse, groupResponse, memberUserResponse, multiPagePaginationResponse, singleItemListGroupsResponse, singleItemListWorkflowsResponse, singleItemPaginationResponse, singlePagePaginationResponse, tokenResponse, userSummaryResponse, workflowCreateResponse, workflowResponse };
|
|
45
|
+
export { MOCK_ADMIN_USER_ID, MOCK_GROUP_ID, MOCK_USER_ID, MOCK_WORKFLOW_ID, MOCK_WORKFLOW_TEMPLATE_ID, adminUserResponse, exhaustedPaginationResponses, groupInfoResponse, groupResponse, memberUserResponse, multiPagePaginationResponse, singleItemListGroupsResponse, singleItemListWorkflowsResponse, singleItemPaginationResponse, singlePagePaginationResponse, tokenResponse, userSummaryResponse, userWithGroupsAndRolesResponse, workflowCreateResponse, workflowResponse };
|
package/dist/mocks/index.mjs
CHANGED
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
//#region mocks/user.fixtures.ts
|
|
2
|
-
const MOCK_USER_ID = "e6e08687-2189-4710-91b5-479cd25a9119";
|
|
3
|
-
const MOCK_ADMIN_USER_ID = "2d099b40-099f-4975-9320-e52aacfaccd6";
|
|
4
|
-
const memberUserResponse = {
|
|
5
|
-
id: MOCK_USER_ID,
|
|
6
|
-
displayName: "Test User",
|
|
7
|
-
email: "test@localhost.com",
|
|
8
|
-
orgRole: "member",
|
|
9
|
-
createdAt: "2026-03-08T12:00:00Z"
|
|
10
|
-
};
|
|
11
|
-
const adminUserResponse = {
|
|
12
|
-
id: MOCK_ADMIN_USER_ID,
|
|
13
|
-
displayName: "Admin User",
|
|
14
|
-
email: "admin@localhost.com",
|
|
15
|
-
orgRole: "admin",
|
|
16
|
-
createdAt: "2026-03-08T12:00:00Z"
|
|
17
|
-
};
|
|
18
|
-
const userSummaryResponse = {
|
|
19
|
-
id: memberUserResponse.id,
|
|
20
|
-
displayName: memberUserResponse.displayName,
|
|
21
|
-
email: memberUserResponse.email
|
|
22
|
-
};
|
|
23
|
-
//#endregion
|
|
24
1
|
//#region mocks/pagination.fixture.ts
|
|
25
2
|
/**
|
|
26
3
|
* Mock a Pagination response with a single element
|
|
@@ -78,6 +55,51 @@ const singleItemListGroupsResponse = {
|
|
|
78
55
|
pagination: singleItemPaginationResponse
|
|
79
56
|
};
|
|
80
57
|
//#endregion
|
|
58
|
+
//#region mocks/user.fixtures.ts
|
|
59
|
+
const MOCK_USER_ID = "e6e08687-2189-4710-91b5-479cd25a9119";
|
|
60
|
+
const MOCK_ADMIN_USER_ID = "2d099b40-099f-4975-9320-e52aacfaccd6";
|
|
61
|
+
const memberUserResponse = {
|
|
62
|
+
id: MOCK_USER_ID,
|
|
63
|
+
displayName: "Test User",
|
|
64
|
+
email: "test@localhost.com",
|
|
65
|
+
orgRole: "member",
|
|
66
|
+
createdAt: "2026-03-08T12:00:00Z",
|
|
67
|
+
groups: [],
|
|
68
|
+
roles: [],
|
|
69
|
+
concurrencyControl: { version: "1" }
|
|
70
|
+
};
|
|
71
|
+
const adminUserResponse = {
|
|
72
|
+
id: MOCK_ADMIN_USER_ID,
|
|
73
|
+
displayName: "Admin User",
|
|
74
|
+
email: "admin@localhost.com",
|
|
75
|
+
orgRole: "admin",
|
|
76
|
+
createdAt: "2026-03-08T12:00:00Z",
|
|
77
|
+
groups: [],
|
|
78
|
+
roles: [],
|
|
79
|
+
concurrencyControl: { version: "1" }
|
|
80
|
+
};
|
|
81
|
+
const userSummaryResponse = {
|
|
82
|
+
id: memberUserResponse.id,
|
|
83
|
+
displayName: memberUserResponse.displayName,
|
|
84
|
+
email: memberUserResponse.email
|
|
85
|
+
};
|
|
86
|
+
const userWithGroupsAndRolesResponse = {
|
|
87
|
+
id: "f3c8b4df-6d75-4309-844a-9c7efc8bf141",
|
|
88
|
+
displayName: "User with Groups and Roles",
|
|
89
|
+
email: "groups-roles@localhost.com",
|
|
90
|
+
orgRole: "member",
|
|
91
|
+
createdAt: "2026-03-08T12:00:00Z",
|
|
92
|
+
groups: [{
|
|
93
|
+
groupId: MOCK_GROUP_ID,
|
|
94
|
+
groupName: "Engineering Team"
|
|
95
|
+
}],
|
|
96
|
+
roles: [{
|
|
97
|
+
roleName: "SpaceManager",
|
|
98
|
+
scope: { type: "org" }
|
|
99
|
+
}],
|
|
100
|
+
concurrencyControl: { version: "1" }
|
|
101
|
+
};
|
|
102
|
+
//#endregion
|
|
81
103
|
//#region mocks/workflow.fixtures.ts
|
|
82
104
|
const MOCK_WORKFLOW_ID = "af20e7fc-66c0-420e-8f35-bf5c1071e6a9";
|
|
83
105
|
const MOCK_WORKFLOW_TEMPLATE_ID = "5932b816-16de-4334-a85c-f32315a6a49d";
|
|
@@ -115,4 +137,4 @@ const tokenResponse = {
|
|
|
115
137
|
refreshToken: "mock_refresh_token"
|
|
116
138
|
};
|
|
117
139
|
//#endregion
|
|
118
|
-
export { MOCK_ADMIN_USER_ID, MOCK_GROUP_ID, MOCK_USER_ID, MOCK_WORKFLOW_ID, MOCK_WORKFLOW_TEMPLATE_ID, adminUserResponse, exhaustedPaginationResponses, groupInfoResponse, groupResponse, memberUserResponse, multiPagePaginationResponse, singleItemListGroupsResponse, singleItemListWorkflowsResponse, singleItemPaginationResponse, singlePagePaginationResponse, tokenResponse, userSummaryResponse, workflowCreateResponse, workflowResponse };
|
|
140
|
+
export { MOCK_ADMIN_USER_ID, MOCK_GROUP_ID, MOCK_USER_ID, MOCK_WORKFLOW_ID, MOCK_WORKFLOW_TEMPLATE_ID, adminUserResponse, exhaustedPaginationResponses, groupInfoResponse, groupResponse, memberUserResponse, multiPagePaginationResponse, singleItemListGroupsResponse, singleItemListWorkflowsResponse, singleItemPaginationResponse, singlePagePaginationResponse, tokenResponse, userSummaryResponse, userWithGroupsAndRolesResponse, workflowCreateResponse, workflowResponse };
|