@approvio/api 0.0.39 → 0.0.41
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 +0 -1
- package/dist/mocks/index.d.cts +1 -1
- package/dist/mocks/index.d.mts +1 -1
- package/dist/src/index.cjs +151 -31
- package/dist/src/index.d.cts +108 -73
- package/dist/src/index.d.mts +108 -73
- package/dist/src/index.mjs +137 -26
- package/dist/{workflow-create-BWzcjT6i.d.mts → workflow-create-CSCUMfYW.d.cts} +56 -24
- package/dist/{workflow-create-YXAJ6Gr8.d.cts → workflow-create-DyEyaGqO.d.mts} +56 -24
- package/package.json +3 -3
package/dist/src/index.mjs
CHANGED
|
@@ -5,8 +5,8 @@ import * as A from "fp-ts/Array";
|
|
|
5
5
|
//#region generated/openapi/model/agent-token-request.ts
|
|
6
6
|
let AgentTokenRequest;
|
|
7
7
|
(function(_AgentTokenRequest) {
|
|
8
|
-
_AgentTokenRequest.GrantTypeEnum = {
|
|
9
|
-
_AgentTokenRequest.ClientAssertionTypeEnum = {
|
|
8
|
+
_AgentTokenRequest.GrantTypeEnum = { UrnIetfParamsOauthGrantTypeJwtBearer: "urn:ietf:params:oauth:grant-type:jwt-bearer" };
|
|
9
|
+
_AgentTokenRequest.ClientAssertionTypeEnum = { UrnIetfParamsOauthClientAssertionTypeJwtBearer: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" };
|
|
10
10
|
})(AgentTokenRequest || (AgentTokenRequest = {}));
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region generated/openapi/model/and-rule.ts
|
|
@@ -33,6 +33,26 @@ let GroupScope;
|
|
|
33
33
|
_GroupScope.TypeEnum = { Group: "group" };
|
|
34
34
|
})(GroupScope || (GroupScope = {}));
|
|
35
35
|
//#endregion
|
|
36
|
+
//#region generated/openapi/model/list-workflow-votes-params.ts
|
|
37
|
+
let ListWorkflowVotesParams;
|
|
38
|
+
(function(_ListWorkflowVotesParams) {
|
|
39
|
+
_ListWorkflowVotesParams.OrderByEnum = {
|
|
40
|
+
TimestampAsc: "TIMESTAMP:ASC",
|
|
41
|
+
TimestampDesc: "TIMESTAMP:DESC"
|
|
42
|
+
};
|
|
43
|
+
})(ListWorkflowVotesParams || (ListWorkflowVotesParams = {}));
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region generated/openapi/model/list-workflows-params.ts
|
|
46
|
+
let ListWorkflowsParams;
|
|
47
|
+
(function(_ListWorkflowsParams) {
|
|
48
|
+
_ListWorkflowsParams.OrderByEnum = {
|
|
49
|
+
CreatedAtAsc: "CREATED_AT:ASC",
|
|
50
|
+
CreatedAtDesc: "CREATED_AT:DESC",
|
|
51
|
+
UpdatedAtAsc: "UPDATED_AT:ASC",
|
|
52
|
+
UpdatedAtDesc: "UPDATED_AT:DESC"
|
|
53
|
+
};
|
|
54
|
+
})(ListWorkflowsParams || (ListWorkflowsParams = {}));
|
|
55
|
+
//#endregion
|
|
36
56
|
//#region generated/openapi/model/or-rule.ts
|
|
37
57
|
let OrRule;
|
|
38
58
|
(function(_OrRule) {
|
|
@@ -80,22 +100,19 @@ let WebhookAction;
|
|
|
80
100
|
};
|
|
81
101
|
})(WebhookAction || (WebhookAction = {}));
|
|
82
102
|
//#endregion
|
|
83
|
-
//#region generated/openapi/model/workflow-template.ts
|
|
84
|
-
let WorkflowTemplate;
|
|
85
|
-
(function(_WorkflowTemplate) {
|
|
86
|
-
_WorkflowTemplate.StatusEnum = {
|
|
87
|
-
Active: "ACTIVE",
|
|
88
|
-
PendingDeprecation: "PENDING_DEPRECATION",
|
|
89
|
-
Deprecated: "DEPRECATED"
|
|
90
|
-
};
|
|
91
|
-
})(WorkflowTemplate || (WorkflowTemplate = {}));
|
|
92
|
-
//#endregion
|
|
93
103
|
//#region generated/openapi/model/workflow-template-scope.ts
|
|
94
104
|
let WorkflowTemplateScope;
|
|
95
105
|
(function(_WorkflowTemplateScope) {
|
|
96
106
|
_WorkflowTemplateScope.TypeEnum = { WorkflowTemplate: "workflow_template" };
|
|
97
107
|
})(WorkflowTemplateScope || (WorkflowTemplateScope = {}));
|
|
98
108
|
//#endregion
|
|
109
|
+
//#region generated/openapi/model/workflow-template-status.ts
|
|
110
|
+
const WorkflowTemplateStatus = {
|
|
111
|
+
Active: "ACTIVE",
|
|
112
|
+
PendingDeprecation: "PENDING_DEPRECATION",
|
|
113
|
+
Deprecated: "DEPRECATED"
|
|
114
|
+
};
|
|
115
|
+
//#endregion
|
|
99
116
|
//#region src/utils/validation.utils.ts
|
|
100
117
|
function hasOwnProperty(obj, prop) {
|
|
101
118
|
return Object.hasOwn(obj, prop);
|
|
@@ -109,6 +126,17 @@ function isNumber(value) {
|
|
|
109
126
|
function isArray(value) {
|
|
110
127
|
return Array.isArray(value);
|
|
111
128
|
}
|
|
129
|
+
function isStringBigInt(value) {
|
|
130
|
+
if (typeof value !== "string") return false;
|
|
131
|
+
try {
|
|
132
|
+
BigInt(value);
|
|
133
|
+
} catch {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
139
|
+
const isUUIDv4 = (value) => value.match(UUID_REGEX) !== null;
|
|
112
140
|
//#endregion
|
|
113
141
|
//#region src/validators/auth.validators.ts
|
|
114
142
|
function validateTokenResponse(object) {
|
|
@@ -197,6 +225,11 @@ function validateOidcCallbackRequest(object) {
|
|
|
197
225
|
});
|
|
198
226
|
}
|
|
199
227
|
//#endregion
|
|
228
|
+
//#region src/utils/enum.ts
|
|
229
|
+
function getStringAsEnum(str, enumType) {
|
|
230
|
+
if (Object.values(enumType).includes(str)) return str;
|
|
231
|
+
}
|
|
232
|
+
//#endregion
|
|
200
233
|
//#region src/validators/groups.validators.ts
|
|
201
234
|
function validateGroup(object) {
|
|
202
235
|
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
@@ -409,11 +442,6 @@ function validateGetEntityInfo200Response(object) {
|
|
|
409
442
|
});
|
|
410
443
|
}
|
|
411
444
|
//#endregion
|
|
412
|
-
//#region src/utils/enum.ts
|
|
413
|
-
function getStringAsEnum(str, enumType) {
|
|
414
|
-
if (Object.values(enumType).includes(str)) return str;
|
|
415
|
-
}
|
|
416
|
-
//#endregion
|
|
417
445
|
//#region src/utils/types.ts
|
|
418
446
|
function prefixLeft(prefix, value) {
|
|
419
447
|
return `${prefix}_${value}`;
|
|
@@ -534,7 +562,7 @@ function validateWorkflowTemplate(object) {
|
|
|
534
562
|
if (!hasOwnProperty(object, "name") || !isNonEmptyString(object.name)) return left("invalid_name");
|
|
535
563
|
if (!hasOwnProperty(object, "version") || !isNonEmptyString(object.version)) return left("invalid_version");
|
|
536
564
|
if (!hasOwnProperty(object, "status") || typeof object.status !== "string") return left("invalid_status");
|
|
537
|
-
const status = getStringAsEnum(object.status,
|
|
565
|
+
const status = getStringAsEnum(object.status, WorkflowTemplateStatus);
|
|
538
566
|
if (!status) return left("invalid_status");
|
|
539
567
|
if (!hasOwnProperty(object, "allowVotingOnDeprecatedTemplate") || typeof object.allowVotingOnDeprecatedTemplate !== "boolean") return left("invalid_allow_voting");
|
|
540
568
|
if (!hasOwnProperty(object, "approvalRule")) return left("missing_approval_rule");
|
|
@@ -543,6 +571,9 @@ function validateWorkflowTemplate(object) {
|
|
|
543
571
|
if (!hasOwnProperty(object, "spaceId") || !isNonEmptyString(object.spaceId)) return left("invalid_space_id");
|
|
544
572
|
if (!hasOwnProperty(object, "createdAt") || !isNonEmptyString(object.createdAt)) return left("invalid_created_at");
|
|
545
573
|
if (!hasOwnProperty(object, "updatedAt") || !isNonEmptyString(object.updatedAt)) return left("invalid_updated_at");
|
|
574
|
+
if (!hasOwnProperty(object, "concurrencyControl")) return left("invalid_concurrency_control");
|
|
575
|
+
const concurrencyControlValidation = validateConcurrencyControl(object.concurrencyControl);
|
|
576
|
+
if (isLeft(concurrencyControlValidation)) return left("invalid_concurrency_control");
|
|
546
577
|
const result = {
|
|
547
578
|
id: object.id,
|
|
548
579
|
name: object.name,
|
|
@@ -552,7 +583,8 @@ function validateWorkflowTemplate(object) {
|
|
|
552
583
|
approvalRule: approvalRuleValidation.right,
|
|
553
584
|
spaceId: object.spaceId,
|
|
554
585
|
createdAt: object.createdAt,
|
|
555
|
-
updatedAt: object.updatedAt
|
|
586
|
+
updatedAt: object.updatedAt,
|
|
587
|
+
concurrencyControl: concurrencyControlValidation.right
|
|
556
588
|
};
|
|
557
589
|
if (hasOwnProperty(object, "description") && object.description !== void 0) {
|
|
558
590
|
if (typeof object.description !== "string") return left("invalid_description");
|
|
@@ -618,7 +650,10 @@ function validateWorkflowTemplateCreate(object) {
|
|
|
618
650
|
}
|
|
619
651
|
function validateWorkflowTemplateUpdate(object) {
|
|
620
652
|
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
621
|
-
|
|
653
|
+
if (!hasOwnProperty(object, "concurrencyControl")) return left("invalid_concurrency_control");
|
|
654
|
+
const concurrencyControlValidation = validateConcurrencyControl(object.concurrencyControl);
|
|
655
|
+
if (isLeft(concurrencyControlValidation)) return left("invalid_concurrency_control");
|
|
656
|
+
const result = { concurrencyControl: concurrencyControlValidation.right };
|
|
622
657
|
if (hasOwnProperty(object, "description") && object.description !== void 0) {
|
|
623
658
|
if (typeof object.description !== "string") return left("invalid_description");
|
|
624
659
|
result.description = object.description;
|
|
@@ -678,10 +713,14 @@ function validateWorkflowTemplateSummary(object) {
|
|
|
678
713
|
if (!hasOwnProperty(object, "version") || !isNonEmptyString(object.version)) return left("invalid_version");
|
|
679
714
|
if (!hasOwnProperty(object, "createdAt") || !isNonEmptyString(object.createdAt)) return left("invalid_created_at");
|
|
680
715
|
if (!hasOwnProperty(object, "updatedAt") || !isNonEmptyString(object.updatedAt)) return left("invalid_updated_at");
|
|
716
|
+
if (!hasOwnProperty(object, "status") || typeof object.status !== "string") return left("invalid_status");
|
|
717
|
+
const status = getStringAsEnum(object.status, WorkflowTemplateStatus);
|
|
718
|
+
if (!status) return left("invalid_status");
|
|
681
719
|
const result = {
|
|
682
720
|
id: object.id,
|
|
683
721
|
name: object.name,
|
|
684
722
|
version: object.version,
|
|
723
|
+
status,
|
|
685
724
|
createdAt: object.createdAt,
|
|
686
725
|
updatedAt: object.updatedAt
|
|
687
726
|
};
|
|
@@ -737,14 +776,23 @@ function validateListWorkflowTemplatesParams(object) {
|
|
|
737
776
|
if (!isNonEmptyString(object.spaceIdentifier)) return left("invalid_space_identifier");
|
|
738
777
|
result.spaceIdentifier = object.spaceIdentifier;
|
|
739
778
|
}
|
|
740
|
-
let status = [
|
|
779
|
+
let status = [WorkflowTemplateStatus.Active];
|
|
741
780
|
if (hasOwnProperty(object, "status") && object.status !== void 0) {
|
|
742
781
|
const statusVal = object.status;
|
|
782
|
+
const validatedStatuses = [];
|
|
743
783
|
if (Array.isArray(statusVal)) {
|
|
744
|
-
for (const item of statusVal)
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
784
|
+
for (const item of statusVal) {
|
|
785
|
+
if (typeof item !== "string") return left("invalid_status");
|
|
786
|
+
const validatedStatus = getStringAsEnum(item, WorkflowTemplateStatus);
|
|
787
|
+
if (!validatedStatus) return left("invalid_status");
|
|
788
|
+
validatedStatuses.push(validatedStatus);
|
|
789
|
+
}
|
|
790
|
+
status = validatedStatuses;
|
|
791
|
+
} else if (typeof statusVal === "string") {
|
|
792
|
+
const validatedStatus = getStringAsEnum(statusVal, WorkflowTemplateStatus);
|
|
793
|
+
if (!validatedStatus) return left("invalid_status");
|
|
794
|
+
status = [validatedStatus];
|
|
795
|
+
} else return left("invalid_status");
|
|
748
796
|
}
|
|
749
797
|
result.status = status;
|
|
750
798
|
if (hasOwnProperty(object, "sortBy") && object.sortBy !== void 0) {
|
|
@@ -783,6 +831,11 @@ function validateListWorkflowTemplatesParams(object) {
|
|
|
783
831
|
}
|
|
784
832
|
return right(result);
|
|
785
833
|
}
|
|
834
|
+
function validateConcurrencyControl(object) {
|
|
835
|
+
if (typeof object !== "object" || object === null) return left("invalid_concurrency_control");
|
|
836
|
+
if (!hasOwnProperty(object, "version") || !isStringBigInt(object.version)) return left("invalid_concurrency_control");
|
|
837
|
+
return right({ version: object.version });
|
|
838
|
+
}
|
|
786
839
|
//#endregion
|
|
787
840
|
//#region src/validators/workflow.validators.ts
|
|
788
841
|
function validateWorkflowCreate(object) {
|
|
@@ -899,9 +952,41 @@ function validateListWorkflowsParams(object) {
|
|
|
899
952
|
if (typeof val !== "string") return left("invalid_workflow_template_identifier");
|
|
900
953
|
workflowTemplateIdentifier = val;
|
|
901
954
|
}
|
|
955
|
+
let includeGroups = void 0;
|
|
956
|
+
if (hasOwnProperty(object, "includeGroups")) {
|
|
957
|
+
const includeGroupsVal = typeof object.includeGroups === "string" ? [object.includeGroups] : object.includeGroups;
|
|
958
|
+
if (!isArray(includeGroupsVal)) return left("invalid_include_groups");
|
|
959
|
+
const validatedIncludeGroups = [];
|
|
960
|
+
for (const item of includeGroupsVal) {
|
|
961
|
+
if (typeof item !== "string") return left("invalid_include_groups");
|
|
962
|
+
if (!isUUIDv4(item)) return left("invalid_include_groups");
|
|
963
|
+
validatedIncludeGroups.push(item);
|
|
964
|
+
}
|
|
965
|
+
includeGroups = validatedIncludeGroups;
|
|
966
|
+
}
|
|
967
|
+
let orderBy = void 0;
|
|
968
|
+
if (hasOwnProperty(object, "orderBy")) {
|
|
969
|
+
const orderByVal = typeof object.orderBy === "string" ? [object.orderBy] : object.orderBy;
|
|
970
|
+
if (!isArray(orderByVal)) return left("invalid_order_by");
|
|
971
|
+
if (orderByVal.length > 3) return left("too_many_order_by_items");
|
|
972
|
+
const validatedOrderBy = [];
|
|
973
|
+
const seenFields = /* @__PURE__ */ new Set();
|
|
974
|
+
for (const item of orderByVal) {
|
|
975
|
+
if (typeof item !== "string") return left("invalid_order_by");
|
|
976
|
+
const enumVal = getStringAsEnum(item, ListWorkflowsParams.OrderByEnum);
|
|
977
|
+
if (enumVal === void 0) return left("invalid_order_by");
|
|
978
|
+
const field = enumVal.split(":")[0];
|
|
979
|
+
if (seenFields.has(field)) return left("duplicate_order_by_fields");
|
|
980
|
+
seenFields.add(field);
|
|
981
|
+
validatedOrderBy.push(enumVal);
|
|
982
|
+
}
|
|
983
|
+
orderBy = validatedOrderBy;
|
|
984
|
+
}
|
|
902
985
|
if (include !== void 0) result.include = include;
|
|
903
986
|
if (includeOnlyNonTerminalState !== void 0) result.includeOnlyNonTerminalState = includeOnlyNonTerminalState;
|
|
904
987
|
if (workflowTemplateIdentifier !== void 0) result.workflowTemplateIdentifier = workflowTemplateIdentifier;
|
|
988
|
+
if (includeGroups !== void 0) result.includeGroups = includeGroups;
|
|
989
|
+
if (orderBy !== void 0) result.orderBy = orderBy;
|
|
905
990
|
return right(result);
|
|
906
991
|
}
|
|
907
992
|
function validateListWorkflows200Response(object) {
|
|
@@ -1044,6 +1129,32 @@ function validateGetWorkflowVotes200Response(object) {
|
|
|
1044
1129
|
}
|
|
1045
1130
|
return right({ votes });
|
|
1046
1131
|
}
|
|
1132
|
+
function validateListWorkflowVotesParams(object) {
|
|
1133
|
+
const sharedValidation = pipe(validateSharedListParams(object), mapLeft((error) => error === "invalid_search" ? "malformed_object" : error));
|
|
1134
|
+
if (isLeft(sharedValidation)) return left(sharedValidation.left);
|
|
1135
|
+
const result = sharedValidation.right;
|
|
1136
|
+
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
1137
|
+
let orderBy = void 0;
|
|
1138
|
+
if (hasOwnProperty(object, "orderBy")) {
|
|
1139
|
+
const orderByVal = typeof object.orderBy === "string" ? [object.orderBy] : object.orderBy;
|
|
1140
|
+
if (!isArray(orderByVal)) return left("invalid_order_by");
|
|
1141
|
+
if (orderByVal.length > 3) return left("too_many_order_by_items");
|
|
1142
|
+
const validatedOrderBy = [];
|
|
1143
|
+
const seenFields = /* @__PURE__ */ new Set();
|
|
1144
|
+
for (const item of orderByVal) {
|
|
1145
|
+
if (typeof item !== "string") return left("invalid_order_by");
|
|
1146
|
+
const enumVal = getStringAsEnum(item, ListWorkflowVotesParams.OrderByEnum);
|
|
1147
|
+
if (enumVal === void 0) return left("invalid_order_by");
|
|
1148
|
+
const field = enumVal.split(":")[0];
|
|
1149
|
+
if (seenFields.has(field)) return left("duplicate_order_by_fields");
|
|
1150
|
+
seenFields.add(field);
|
|
1151
|
+
validatedOrderBy.push(enumVal);
|
|
1152
|
+
}
|
|
1153
|
+
orderBy = validatedOrderBy;
|
|
1154
|
+
}
|
|
1155
|
+
if (orderBy !== void 0) result.orderBy = orderBy;
|
|
1156
|
+
return right(result);
|
|
1157
|
+
}
|
|
1047
1158
|
//#endregion
|
|
1048
1159
|
//#region src/validators/users.validators.ts
|
|
1049
1160
|
function validateUser(object) {
|
|
@@ -1430,4 +1541,4 @@ function isAPIError(object) {
|
|
|
1430
1541
|
return E.isRight(validateAPIError(object));
|
|
1431
1542
|
}
|
|
1432
1543
|
//#endregion
|
|
1433
|
-
export { AgentTokenRequest, AndRule, EmailAction, GroupRequirementRule, GroupScope, OrRule, OrgScope, SortBy, SortDirection, SpaceScope, VoteApprove, VoteVeto, VoteWithdraw, WebhookAction,
|
|
1544
|
+
export { AgentTokenRequest, AndRule, EmailAction, GroupRequirementRule, GroupScope, ListWorkflowVotesParams, ListWorkflowsParams, OrRule, OrgScope, SortBy, SortDirection, SpaceScope, VoteApprove, VoteVeto, VoteWithdraw, WebhookAction, WorkflowTemplateScope, WorkflowTemplateStatus, isAPIError, validateAPIError, validateAddGroupEntitiesRequest, validateAgentChallengeRequest, validateAgentChallengeResponse, validateAgentGet200Response, validateAgentRegistrationRequest, validateAgentRegistrationResponse, validateAgentTokenRequest, validateAgentTokenResponse, validateCanVoteResponse, validateConcurrencyControl, validateGetEntityInfo200Response, validateGetWorkflowParams, validateGetWorkflowVotes200Response, validateGroupCreate, validateGroupInfo, validateGroupScope, validateHealthResponse, validateInitiateCliLogin200Response, validateInitiateCliLoginRequest, validateListAgents200Response, validateListAgentsParams, validateListGroupEntities200Response, validateListGroups200Response, validateListGroupsParams, validateListOrganizationAdminsForOrg200Response, validateListRoleTemplates200Response, validateListSpaces200Response, validateListSpacesParams, validateListUsers200Response, validateListUsersParams, validateListWorkflowTemplates200Response, validateListWorkflowTemplatesParams, validateListWorkflowVotesParams, validateListWorkflows200Response, validateListWorkflowsParams, validateOidcCallbackRequest, validateOrganizationAdminCreate, validateOrganizationAdminRemove, validatePagination, validatePrivilegedTokenExchangeRequest, validatePrivilegedTokenResponse, validateRefreshTokenRequest, validateRemoveGroupEntitiesRequest, validateRoleAssignmentRequest, validateRoleRemovalRequest, validateSharedListParams, validateSpaceCreate, validateSpaceScope, validateTokenRequest, validateTokenResponse, validateUser, validateUserCreate, validateWorkflowCreate, validateWorkflowTemplate, validateWorkflowTemplateCreate, validateWorkflowTemplateDeprecate, validateWorkflowTemplateScope, validateWorkflowTemplateUpdate, validateWorkflowVoteRequest };
|
|
@@ -24,7 +24,7 @@ declare namespace OrRule {
|
|
|
24
24
|
* Workflow Approval System API
|
|
25
25
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
26
26
|
*
|
|
27
|
-
* The version of the OpenAPI document: 0.0.
|
|
27
|
+
* The version of the OpenAPI document: 0.0.36
|
|
28
28
|
*
|
|
29
29
|
*
|
|
30
30
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -91,12 +91,31 @@ declare namespace AndRule {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
|
+
//#region generated/openapi/model/concurrency-control.d.ts
|
|
95
|
+
/**
|
|
96
|
+
* Workflow Approval System API
|
|
97
|
+
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
98
|
+
*
|
|
99
|
+
* The version of the OpenAPI document: 0.0.36
|
|
100
|
+
*
|
|
101
|
+
*
|
|
102
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
103
|
+
* https://openapi-generator.tech
|
|
104
|
+
* Do not edit the class manually.
|
|
105
|
+
*/
|
|
106
|
+
interface ConcurrencyControl {
|
|
107
|
+
/**
|
|
108
|
+
* Optimistic concurrency control version to prevent race conditions and detect updates from other users.
|
|
109
|
+
*/
|
|
110
|
+
version: string;
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
94
113
|
//#region generated/openapi/model/email-action.d.ts
|
|
95
114
|
/**
|
|
96
115
|
* Workflow Approval System API
|
|
97
116
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
98
117
|
*
|
|
99
|
-
* The version of the OpenAPI document: 0.0.
|
|
118
|
+
* The version of the OpenAPI document: 0.0.36
|
|
100
119
|
*
|
|
101
120
|
*
|
|
102
121
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -128,7 +147,7 @@ declare namespace EmailAction {
|
|
|
128
147
|
* Workflow Approval System API
|
|
129
148
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
130
149
|
*
|
|
131
|
-
* The version of the OpenAPI document: 0.0.
|
|
150
|
+
* The version of the OpenAPI document: 0.0.36
|
|
132
151
|
*
|
|
133
152
|
*
|
|
134
153
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -145,7 +164,7 @@ interface GroupInfo {
|
|
|
145
164
|
* Workflow Approval System API
|
|
146
165
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
147
166
|
*
|
|
148
|
-
* The version of the OpenAPI document: 0.0.
|
|
167
|
+
* The version of the OpenAPI document: 0.0.36
|
|
149
168
|
*
|
|
150
169
|
*
|
|
151
170
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -184,7 +203,7 @@ interface Group {
|
|
|
184
203
|
* Workflow Approval System API
|
|
185
204
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
186
205
|
*
|
|
187
|
-
* The version of the OpenAPI document: 0.0.
|
|
206
|
+
* The version of the OpenAPI document: 0.0.36
|
|
188
207
|
*
|
|
189
208
|
*
|
|
190
209
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -217,7 +236,7 @@ interface ListGroups200Response {
|
|
|
217
236
|
* Workflow Approval System API
|
|
218
237
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
219
238
|
*
|
|
220
|
-
* The version of the OpenAPI document: 0.0.
|
|
239
|
+
* The version of the OpenAPI document: 0.0.36
|
|
221
240
|
*
|
|
222
241
|
*
|
|
223
242
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -239,12 +258,34 @@ interface UserSummary {
|
|
|
239
258
|
email: string;
|
|
240
259
|
}
|
|
241
260
|
//#endregion
|
|
261
|
+
//#region generated/openapi/model/workflow-template-status.d.ts
|
|
262
|
+
/**
|
|
263
|
+
* Workflow Approval System API
|
|
264
|
+
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
265
|
+
*
|
|
266
|
+
* The version of the OpenAPI document: 0.0.36
|
|
267
|
+
*
|
|
268
|
+
*
|
|
269
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
270
|
+
* https://openapi-generator.tech
|
|
271
|
+
* Do not edit the class manually.
|
|
272
|
+
*/
|
|
273
|
+
/**
|
|
274
|
+
* Lifecycle status of the template: * ACTIVE - Template can be referenced to create new workflows * PENDING_DEPRECATION - Template has been deprecated but there are still active workflows (intermediate status for async deprecation) * DEPRECATED - Template cannot be referenced for new workflows, voting may still be allowed based on settings
|
|
275
|
+
*/
|
|
276
|
+
type WorkflowTemplateStatus = 'ACTIVE' | 'PENDING_DEPRECATION' | 'DEPRECATED';
|
|
277
|
+
declare const WorkflowTemplateStatus: {
|
|
278
|
+
Active: WorkflowTemplateStatus;
|
|
279
|
+
PendingDeprecation: WorkflowTemplateStatus;
|
|
280
|
+
Deprecated: WorkflowTemplateStatus;
|
|
281
|
+
};
|
|
282
|
+
//#endregion
|
|
242
283
|
//#region generated/openapi/model/webhook-action.d.ts
|
|
243
284
|
/**
|
|
244
285
|
* Workflow Approval System API
|
|
245
286
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
246
287
|
*
|
|
247
|
-
* The version of the OpenAPI document: 0.0.
|
|
288
|
+
* The version of the OpenAPI document: 0.0.36
|
|
248
289
|
*
|
|
249
290
|
*
|
|
250
291
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -270,7 +311,7 @@ interface WebhookAction {
|
|
|
270
311
|
/**
|
|
271
312
|
* Optional headers to send with the request
|
|
272
313
|
*/
|
|
273
|
-
headers?: {
|
|
314
|
+
'headers'?: {
|
|
274
315
|
[key: string]: string;
|
|
275
316
|
};
|
|
276
317
|
}
|
|
@@ -316,10 +357,7 @@ interface WorkflowTemplate {
|
|
|
316
357
|
* Detailed description of the workflow template
|
|
317
358
|
*/
|
|
318
359
|
description?: string;
|
|
319
|
-
|
|
320
|
-
* Lifecycle status of the template: * ACTIVE - Template can be referenced to create new workflows * PENDING_DEPRECATION - Template has been deprecated but there are still active workflows (intermediate status for async deprecation) * DEPRECATED - Template cannot be referenced for new workflows, voting may still be allowed based on settings
|
|
321
|
-
*/
|
|
322
|
-
status: WorkflowTemplate.StatusEnum;
|
|
360
|
+
status: WorkflowTemplateStatus;
|
|
323
361
|
/**
|
|
324
362
|
* Whether voting is allowed on workflows using this template when it\'s deprecated
|
|
325
363
|
*/
|
|
@@ -349,15 +387,9 @@ interface WorkflowTemplate {
|
|
|
349
387
|
* Last update timestamp
|
|
350
388
|
*/
|
|
351
389
|
updatedAt: string;
|
|
390
|
+
concurrencyControl: ConcurrencyControl;
|
|
352
391
|
}
|
|
353
|
-
declare namespace WorkflowTemplate {
|
|
354
|
-
type StatusEnum = 'ACTIVE' | 'PENDING_DEPRECATION' | 'DEPRECATED';
|
|
355
|
-
const StatusEnum: {
|
|
356
|
-
Active: StatusEnum;
|
|
357
|
-
PendingDeprecation: StatusEnum;
|
|
358
|
-
Deprecated: StatusEnum;
|
|
359
|
-
};
|
|
360
|
-
}
|
|
392
|
+
declare namespace WorkflowTemplate {}
|
|
361
393
|
//#endregion
|
|
362
394
|
//#region generated/openapi/model/workflow-ref.d.ts
|
|
363
395
|
/**
|
|
@@ -419,7 +451,7 @@ interface ListWorkflows200Response {
|
|
|
419
451
|
* Workflow Approval System API
|
|
420
452
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
421
453
|
*
|
|
422
|
-
* The version of the OpenAPI document: 0.0.
|
|
454
|
+
* The version of the OpenAPI document: 0.0.36
|
|
423
455
|
*
|
|
424
456
|
*
|
|
425
457
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -442,7 +474,7 @@ interface TokenResponse {
|
|
|
442
474
|
* Workflow Approval System API
|
|
443
475
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
444
476
|
*
|
|
445
|
-
* The version of the OpenAPI document: 0.0.
|
|
477
|
+
* The version of the OpenAPI document: 0.0.36
|
|
446
478
|
*
|
|
447
479
|
*
|
|
448
480
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -477,7 +509,7 @@ interface User {
|
|
|
477
509
|
* Workflow Approval System API
|
|
478
510
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
479
511
|
*
|
|
480
|
-
* The version of the OpenAPI document: 0.0.
|
|
512
|
+
* The version of the OpenAPI document: 0.0.36
|
|
481
513
|
*
|
|
482
514
|
*
|
|
483
515
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -503,4 +535,4 @@ interface WorkflowCreate {
|
|
|
503
535
|
workflowTemplateId: string;
|
|
504
536
|
}
|
|
505
537
|
//#endregion
|
|
506
|
-
export {
|
|
538
|
+
export { ConcurrencyControl as _, Workflow as a, GroupRequirementRule as b, WorkflowAction as c, UserSummary as d, ListGroups200Response as f, EmailAction as g, GroupInfo as h, ListWorkflows200Response as i, WebhookAction as l, Group as m, User as n, WorkflowRef as o, Pagination as p, TokenResponse as r, WorkflowTemplate as s, WorkflowCreate as t, WorkflowTemplateStatus as u, AndRule as v, OrRule as x, ApprovalRule as y };
|
|
@@ -24,7 +24,7 @@ declare namespace OrRule {
|
|
|
24
24
|
* Workflow Approval System API
|
|
25
25
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
26
26
|
*
|
|
27
|
-
* The version of the OpenAPI document: 0.0.
|
|
27
|
+
* The version of the OpenAPI document: 0.0.36
|
|
28
28
|
*
|
|
29
29
|
*
|
|
30
30
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -91,12 +91,31 @@ declare namespace AndRule {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
|
+
//#region generated/openapi/model/concurrency-control.d.ts
|
|
95
|
+
/**
|
|
96
|
+
* Workflow Approval System API
|
|
97
|
+
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
98
|
+
*
|
|
99
|
+
* The version of the OpenAPI document: 0.0.36
|
|
100
|
+
*
|
|
101
|
+
*
|
|
102
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
103
|
+
* https://openapi-generator.tech
|
|
104
|
+
* Do not edit the class manually.
|
|
105
|
+
*/
|
|
106
|
+
interface ConcurrencyControl {
|
|
107
|
+
/**
|
|
108
|
+
* Optimistic concurrency control version to prevent race conditions and detect updates from other users.
|
|
109
|
+
*/
|
|
110
|
+
version: string;
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
94
113
|
//#region generated/openapi/model/email-action.d.ts
|
|
95
114
|
/**
|
|
96
115
|
* Workflow Approval System API
|
|
97
116
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
98
117
|
*
|
|
99
|
-
* The version of the OpenAPI document: 0.0.
|
|
118
|
+
* The version of the OpenAPI document: 0.0.36
|
|
100
119
|
*
|
|
101
120
|
*
|
|
102
121
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -128,7 +147,7 @@ declare namespace EmailAction {
|
|
|
128
147
|
* Workflow Approval System API
|
|
129
148
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
130
149
|
*
|
|
131
|
-
* The version of the OpenAPI document: 0.0.
|
|
150
|
+
* The version of the OpenAPI document: 0.0.36
|
|
132
151
|
*
|
|
133
152
|
*
|
|
134
153
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -145,7 +164,7 @@ interface GroupInfo {
|
|
|
145
164
|
* Workflow Approval System API
|
|
146
165
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
147
166
|
*
|
|
148
|
-
* The version of the OpenAPI document: 0.0.
|
|
167
|
+
* The version of the OpenAPI document: 0.0.36
|
|
149
168
|
*
|
|
150
169
|
*
|
|
151
170
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -184,7 +203,7 @@ interface Group {
|
|
|
184
203
|
* Workflow Approval System API
|
|
185
204
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
186
205
|
*
|
|
187
|
-
* The version of the OpenAPI document: 0.0.
|
|
206
|
+
* The version of the OpenAPI document: 0.0.36
|
|
188
207
|
*
|
|
189
208
|
*
|
|
190
209
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -217,7 +236,7 @@ interface ListGroups200Response {
|
|
|
217
236
|
* Workflow Approval System API
|
|
218
237
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
219
238
|
*
|
|
220
|
-
* The version of the OpenAPI document: 0.0.
|
|
239
|
+
* The version of the OpenAPI document: 0.0.36
|
|
221
240
|
*
|
|
222
241
|
*
|
|
223
242
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -239,12 +258,34 @@ interface UserSummary {
|
|
|
239
258
|
email: string;
|
|
240
259
|
}
|
|
241
260
|
//#endregion
|
|
261
|
+
//#region generated/openapi/model/workflow-template-status.d.ts
|
|
262
|
+
/**
|
|
263
|
+
* Workflow Approval System API
|
|
264
|
+
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
265
|
+
*
|
|
266
|
+
* The version of the OpenAPI document: 0.0.36
|
|
267
|
+
*
|
|
268
|
+
*
|
|
269
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
270
|
+
* https://openapi-generator.tech
|
|
271
|
+
* Do not edit the class manually.
|
|
272
|
+
*/
|
|
273
|
+
/**
|
|
274
|
+
* Lifecycle status of the template: * ACTIVE - Template can be referenced to create new workflows * PENDING_DEPRECATION - Template has been deprecated but there are still active workflows (intermediate status for async deprecation) * DEPRECATED - Template cannot be referenced for new workflows, voting may still be allowed based on settings
|
|
275
|
+
*/
|
|
276
|
+
type WorkflowTemplateStatus = 'ACTIVE' | 'PENDING_DEPRECATION' | 'DEPRECATED';
|
|
277
|
+
declare const WorkflowTemplateStatus: {
|
|
278
|
+
Active: WorkflowTemplateStatus;
|
|
279
|
+
PendingDeprecation: WorkflowTemplateStatus;
|
|
280
|
+
Deprecated: WorkflowTemplateStatus;
|
|
281
|
+
};
|
|
282
|
+
//#endregion
|
|
242
283
|
//#region generated/openapi/model/webhook-action.d.ts
|
|
243
284
|
/**
|
|
244
285
|
* Workflow Approval System API
|
|
245
286
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
246
287
|
*
|
|
247
|
-
* The version of the OpenAPI document: 0.0.
|
|
288
|
+
* The version of the OpenAPI document: 0.0.36
|
|
248
289
|
*
|
|
249
290
|
*
|
|
250
291
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -270,7 +311,7 @@ interface WebhookAction {
|
|
|
270
311
|
/**
|
|
271
312
|
* Optional headers to send with the request
|
|
272
313
|
*/
|
|
273
|
-
headers?: {
|
|
314
|
+
'headers'?: {
|
|
274
315
|
[key: string]: string;
|
|
275
316
|
};
|
|
276
317
|
}
|
|
@@ -316,10 +357,7 @@ interface WorkflowTemplate {
|
|
|
316
357
|
* Detailed description of the workflow template
|
|
317
358
|
*/
|
|
318
359
|
description?: string;
|
|
319
|
-
|
|
320
|
-
* Lifecycle status of the template: * ACTIVE - Template can be referenced to create new workflows * PENDING_DEPRECATION - Template has been deprecated but there are still active workflows (intermediate status for async deprecation) * DEPRECATED - Template cannot be referenced for new workflows, voting may still be allowed based on settings
|
|
321
|
-
*/
|
|
322
|
-
status: WorkflowTemplate.StatusEnum;
|
|
360
|
+
status: WorkflowTemplateStatus;
|
|
323
361
|
/**
|
|
324
362
|
* Whether voting is allowed on workflows using this template when it\'s deprecated
|
|
325
363
|
*/
|
|
@@ -349,15 +387,9 @@ interface WorkflowTemplate {
|
|
|
349
387
|
* Last update timestamp
|
|
350
388
|
*/
|
|
351
389
|
updatedAt: string;
|
|
390
|
+
concurrencyControl: ConcurrencyControl;
|
|
352
391
|
}
|
|
353
|
-
declare namespace WorkflowTemplate {
|
|
354
|
-
type StatusEnum = 'ACTIVE' | 'PENDING_DEPRECATION' | 'DEPRECATED';
|
|
355
|
-
const StatusEnum: {
|
|
356
|
-
Active: StatusEnum;
|
|
357
|
-
PendingDeprecation: StatusEnum;
|
|
358
|
-
Deprecated: StatusEnum;
|
|
359
|
-
};
|
|
360
|
-
}
|
|
392
|
+
declare namespace WorkflowTemplate {}
|
|
361
393
|
//#endregion
|
|
362
394
|
//#region generated/openapi/model/workflow-ref.d.ts
|
|
363
395
|
/**
|
|
@@ -419,7 +451,7 @@ interface ListWorkflows200Response {
|
|
|
419
451
|
* Workflow Approval System API
|
|
420
452
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
421
453
|
*
|
|
422
|
-
* The version of the OpenAPI document: 0.0.
|
|
454
|
+
* The version of the OpenAPI document: 0.0.36
|
|
423
455
|
*
|
|
424
456
|
*
|
|
425
457
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -442,7 +474,7 @@ interface TokenResponse {
|
|
|
442
474
|
* Workflow Approval System API
|
|
443
475
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
444
476
|
*
|
|
445
|
-
* The version of the OpenAPI document: 0.0.
|
|
477
|
+
* The version of the OpenAPI document: 0.0.36
|
|
446
478
|
*
|
|
447
479
|
*
|
|
448
480
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -477,7 +509,7 @@ interface User {
|
|
|
477
509
|
* Workflow Approval System API
|
|
478
510
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
479
511
|
*
|
|
480
|
-
* The version of the OpenAPI document: 0.0.
|
|
512
|
+
* The version of the OpenAPI document: 0.0.36
|
|
481
513
|
*
|
|
482
514
|
*
|
|
483
515
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -503,4 +535,4 @@ interface WorkflowCreate {
|
|
|
503
535
|
workflowTemplateId: string;
|
|
504
536
|
}
|
|
505
537
|
//#endregion
|
|
506
|
-
export {
|
|
538
|
+
export { ConcurrencyControl as _, Workflow as a, GroupRequirementRule as b, WorkflowAction as c, UserSummary as d, ListGroups200Response as f, EmailAction as g, GroupInfo as h, ListWorkflows200Response as i, WebhookAction as l, Group as m, User as n, WorkflowRef as o, Pagination as p, TokenResponse as r, WorkflowTemplate as s, WorkflowCreate as t, WorkflowTemplateStatus as u, AndRule as v, OrRule as x, ApprovalRule as y };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@approvio/api",
|
|
3
3
|
"author": "Giovanni Baratta",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.41",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/src/index.cjs",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@eslint/js": "10.0.1",
|
|
49
|
-
"@openapitools/openapi-generator-cli": "^2.
|
|
49
|
+
"@openapitools/openapi-generator-cli": "^2.31.0",
|
|
50
50
|
"@redocly/cli": "1.34.4",
|
|
51
51
|
"@stoplight/spectral-cli": "6.15.0",
|
|
52
52
|
"@types/jest": "30.0.0",
|
|
@@ -69,4 +69,4 @@
|
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"fp-ts": "^2.0.0"
|
|
71
71
|
}
|
|
72
|
-
}
|
|
72
|
+
}
|