@approvio/api 0.0.32 → 0.0.33
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/dist/mocks/index.d.cts +1 -1
- package/dist/mocks/index.d.mts +1 -1
- package/dist/src/index.cjs +34 -11
- package/dist/src/index.d.cts +145 -47
- package/dist/src/index.d.mts +145 -47
- package/dist/src/index.mjs +31 -12
- package/dist/{workflow-create-CtzZubWu.d.mts → workflow-create-B9_eIGcu.d.mts} +11 -11
- package/dist/{workflow-create-c9jqkg6v.d.cts → workflow-create-Bmi0J-Dc.d.cts} +11 -11
- package/package.json +1 -1
package/dist/mocks/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Workflow, d as ListGroups200Response, f as Pagination, i as ListWorkflows200Response, m as GroupInfo, n as User, p as Group, r as TokenResponse, t as WorkflowCreate, u as UserSummary } from "../workflow-create-
|
|
1
|
+
import { a as Workflow, d as ListGroups200Response, f as Pagination, i as ListWorkflows200Response, m as GroupInfo, n as User, p as Group, r as TokenResponse, t as WorkflowCreate, u as UserSummary } from "../workflow-create-Bmi0J-Dc.cjs";
|
|
2
2
|
|
|
3
3
|
//#region mocks/user.fixtures.d.ts
|
|
4
4
|
declare const MOCK_USER_ID = "e6e08687-2189-4710-91b5-479cd25a9119";
|
package/dist/mocks/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Workflow, d as ListGroups200Response, f as Pagination, i as ListWorkflows200Response, m as GroupInfo, n as User, p as Group, r as TokenResponse, t as WorkflowCreate, u as UserSummary } from "../workflow-create-
|
|
1
|
+
import { a as Workflow, d as ListGroups200Response, f as Pagination, i as ListWorkflows200Response, m as GroupInfo, n as User, p as Group, r as TokenResponse, t as WorkflowCreate, u as UserSummary } from "../workflow-create-B9_eIGcu.mjs";
|
|
2
2
|
|
|
3
3
|
//#region mocks/user.fixtures.d.ts
|
|
4
4
|
declare const MOCK_USER_ID = "e6e08687-2189-4710-91b5-479cd25a9119";
|
package/dist/src/index.cjs
CHANGED
|
@@ -279,6 +279,9 @@ function validateGroupScope(object) {
|
|
|
279
279
|
groupId: object.groupId
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
|
+
function validateListGroupsParams(object) {
|
|
283
|
+
return validateSharedListParams(object);
|
|
284
|
+
}
|
|
282
285
|
function validateGroupInfo(object) {
|
|
283
286
|
if (typeof object !== "object" || object === null) return (0, fp_ts_Either.left)("malformed_object");
|
|
284
287
|
if (!hasOwnProperty(object, "groupId") || !isNonEmptyString(object.groupId)) return (0, fp_ts_Either.left)(hasOwnProperty(object, "groupId") ? "invalid_group_id" : "missing_group_id");
|
|
@@ -363,6 +366,23 @@ function validateListGroupEntities200Response(object) {
|
|
|
363
366
|
}
|
|
364
367
|
//#endregion
|
|
365
368
|
//#region src/validators/common.validators.ts
|
|
369
|
+
function validateSharedListParams(object) {
|
|
370
|
+
if (typeof object !== "object" || object === null) return (0, fp_ts_Either.left)("malformed_object");
|
|
371
|
+
const result = {};
|
|
372
|
+
if (hasOwnProperty(object, "page") && object.page !== void 0) {
|
|
373
|
+
if (typeof object.page !== "number" || object.page < 1) return (0, fp_ts_Either.left)("invalid_page");
|
|
374
|
+
result.page = object.page;
|
|
375
|
+
}
|
|
376
|
+
if (hasOwnProperty(object, "limit") && object.limit !== void 0) {
|
|
377
|
+
if (typeof object.limit !== "number" || object.limit < 1) return (0, fp_ts_Either.left)("invalid_limit");
|
|
378
|
+
result.limit = object.limit;
|
|
379
|
+
}
|
|
380
|
+
if (hasOwnProperty(object, "search") && object.search !== void 0) {
|
|
381
|
+
if (typeof object.search !== "string" || object.search.trim() === "") return (0, fp_ts_Either.left)("invalid_search");
|
|
382
|
+
result.search = object.search;
|
|
383
|
+
}
|
|
384
|
+
return (0, fp_ts_Either.right)(result);
|
|
385
|
+
}
|
|
366
386
|
function validatePagination(object) {
|
|
367
387
|
if (typeof object !== "object" || object === null) return (0, fp_ts_Either.left)("malformed_object");
|
|
368
388
|
if (!hasOwnProperty(object, "total")) return (0, fp_ts_Either.left)("missing_total");
|
|
@@ -701,17 +721,10 @@ function validateListWorkflowTemplates200Response(object) {
|
|
|
701
721
|
});
|
|
702
722
|
}
|
|
703
723
|
function validateListWorkflowTemplatesParams(object) {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
result.page = object.page;
|
|
709
|
-
}
|
|
710
|
-
if (hasOwnProperty(object, "limit") && object.limit !== void 0) {
|
|
711
|
-
if (typeof object.limit !== "number") return (0, fp_ts_Either.left)("invalid_limit");
|
|
712
|
-
result.limit = object.limit;
|
|
713
|
-
}
|
|
714
|
-
if (hasOwnProperty(object, "spaceIdentifier") && object.spaceIdentifier !== void 0) {
|
|
724
|
+
const sharedValidation = validateSharedListParams(object);
|
|
725
|
+
if ((0, fp_ts_Either.isLeft)(sharedValidation)) return (0, fp_ts_Either.left)(sharedValidation.left);
|
|
726
|
+
const result = sharedValidation.right;
|
|
727
|
+
if (typeof object === "object" && object !== null && hasOwnProperty(object, "spaceIdentifier") && object.spaceIdentifier !== void 0) {
|
|
715
728
|
if (!isNonEmptyString(object.spaceIdentifier)) return (0, fp_ts_Either.left)("invalid_space_identifier");
|
|
716
729
|
result.spaceIdentifier = object.spaceIdentifier;
|
|
717
730
|
}
|
|
@@ -1111,6 +1124,9 @@ function validateRoleAssignmentRequest(object) {
|
|
|
1111
1124
|
function validateRoleRemovalRequest(object) {
|
|
1112
1125
|
return validateRoleAssignmentRequest(object);
|
|
1113
1126
|
}
|
|
1127
|
+
function validateListUsersParams(object) {
|
|
1128
|
+
return validateSharedListParams(object);
|
|
1129
|
+
}
|
|
1114
1130
|
//#endregion
|
|
1115
1131
|
//#region src/validators/spaces.validators.ts
|
|
1116
1132
|
function validateSpace(object) {
|
|
@@ -1175,6 +1191,9 @@ function validateSpaceScope(object) {
|
|
|
1175
1191
|
spaceId: object.spaceId
|
|
1176
1192
|
});
|
|
1177
1193
|
}
|
|
1194
|
+
function validateListSpacesParams(object) {
|
|
1195
|
+
return validateSharedListParams(object);
|
|
1196
|
+
}
|
|
1178
1197
|
//#endregion
|
|
1179
1198
|
//#region src/validators/agents.validators.ts
|
|
1180
1199
|
function validateAgentSummary(object) {
|
|
@@ -1487,10 +1506,13 @@ exports.validateListAgents200Response = validateListAgents200Response;
|
|
|
1487
1506
|
exports.validateListAgentsParams = validateListAgentsParams;
|
|
1488
1507
|
exports.validateListGroupEntities200Response = validateListGroupEntities200Response;
|
|
1489
1508
|
exports.validateListGroups200Response = validateListGroups200Response;
|
|
1509
|
+
exports.validateListGroupsParams = validateListGroupsParams;
|
|
1490
1510
|
exports.validateListOrganizationAdminsForOrg200Response = validateListOrganizationAdminsForOrg200Response;
|
|
1491
1511
|
exports.validateListRoleTemplates200Response = validateListRoleTemplates200Response;
|
|
1492
1512
|
exports.validateListSpaces200Response = validateListSpaces200Response;
|
|
1513
|
+
exports.validateListSpacesParams = validateListSpacesParams;
|
|
1493
1514
|
exports.validateListUsers200Response = validateListUsers200Response;
|
|
1515
|
+
exports.validateListUsersParams = validateListUsersParams;
|
|
1494
1516
|
exports.validateListWorkflowTemplates200Response = validateListWorkflowTemplates200Response;
|
|
1495
1517
|
exports.validateListWorkflowTemplatesParams = validateListWorkflowTemplatesParams;
|
|
1496
1518
|
exports.validateListWorkflows200Response = validateListWorkflows200Response;
|
|
@@ -1505,6 +1527,7 @@ exports.validateRefreshTokenRequest = validateRefreshTokenRequest;
|
|
|
1505
1527
|
exports.validateRemoveGroupEntitiesRequest = validateRemoveGroupEntitiesRequest;
|
|
1506
1528
|
exports.validateRoleAssignmentRequest = validateRoleAssignmentRequest;
|
|
1507
1529
|
exports.validateRoleRemovalRequest = validateRoleRemovalRequest;
|
|
1530
|
+
exports.validateSharedListParams = validateSharedListParams;
|
|
1508
1531
|
exports.validateSpaceCreate = validateSpaceCreate;
|
|
1509
1532
|
exports.validateSpaceScope = validateSpaceScope;
|
|
1510
1533
|
exports.validateTokenRequest = validateTokenRequest;
|