@approvio/api 0.0.40 → 0.0.42
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 +399 -5
- package/dist/src/index.d.cts +849 -45
- package/dist/src/index.d.mts +849 -45
- package/dist/src/index.mjs +293 -6
- package/dist/{workflow-create-DL0bZ2df.d.mts → workflow-create-COE72Khd.d.cts} +12 -12
- package/dist/{workflow-create-Ng_I-FfX.d.cts → workflow-create-D4c1cIa_.d.mts} +12 -12
- package/package.json +1 -1
package/dist/src/index.mjs
CHANGED
|
@@ -21,6 +21,57 @@ let EmailAction;
|
|
|
21
21
|
_EmailAction.TypeEnum = { Email: "EMAIL" };
|
|
22
22
|
})(EmailAction || (EmailAction = {}));
|
|
23
23
|
//#endregion
|
|
24
|
+
//#region generated/openapi/model/global-quota.ts
|
|
25
|
+
let GlobalQuota;
|
|
26
|
+
(function(_GlobalQuota) {
|
|
27
|
+
_GlobalQuota.QuotaTypeEnum = {
|
|
28
|
+
MaxGroups: "MAX_GROUPS",
|
|
29
|
+
MaxSpaces: "MAX_SPACES"
|
|
30
|
+
};
|
|
31
|
+
_GlobalQuota.ScopeEnum = { Global: "GLOBAL" };
|
|
32
|
+
})(GlobalQuota || (GlobalQuota = {}));
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region generated/openapi/model/global-quota-base.ts
|
|
35
|
+
let GlobalQuotaBase;
|
|
36
|
+
(function(_GlobalQuotaBase) {
|
|
37
|
+
_GlobalQuotaBase.ScopeEnum = { Global: "GLOBAL" };
|
|
38
|
+
_GlobalQuotaBase.QuotaTypeEnum = {
|
|
39
|
+
MaxGroups: "MAX_GROUPS",
|
|
40
|
+
MaxSpaces: "MAX_SPACES"
|
|
41
|
+
};
|
|
42
|
+
})(GlobalQuotaBase || (GlobalQuotaBase = {}));
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region generated/openapi/model/global-quota-create.ts
|
|
45
|
+
let GlobalQuotaCreate;
|
|
46
|
+
(function(_GlobalQuotaCreate) {
|
|
47
|
+
_GlobalQuotaCreate.QuotaTypeEnum = {
|
|
48
|
+
MaxGroups: "MAX_GROUPS",
|
|
49
|
+
MaxSpaces: "MAX_SPACES"
|
|
50
|
+
};
|
|
51
|
+
_GlobalQuotaCreate.ScopeEnum = { Global: "GLOBAL" };
|
|
52
|
+
})(GlobalQuotaCreate || (GlobalQuotaCreate = {}));
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region generated/openapi/model/group-quota.ts
|
|
55
|
+
let GroupQuota;
|
|
56
|
+
(function(_GroupQuota) {
|
|
57
|
+
_GroupQuota.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
58
|
+
_GroupQuota.ScopeEnum = { Group: "GROUP" };
|
|
59
|
+
})(GroupQuota || (GroupQuota = {}));
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region generated/openapi/model/group-quota-base.ts
|
|
62
|
+
let GroupQuotaBase;
|
|
63
|
+
(function(_GroupQuotaBase) {
|
|
64
|
+
_GroupQuotaBase.ScopeEnum = { Group: "GROUP" };
|
|
65
|
+
_GroupQuotaBase.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
66
|
+
})(GroupQuotaBase || (GroupQuotaBase = {}));
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region generated/openapi/model/group-quota-create.ts
|
|
69
|
+
let GroupQuotaCreate;
|
|
70
|
+
(function(_GroupQuotaCreate) {
|
|
71
|
+
_GroupQuotaCreate.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
72
|
+
_GroupQuotaCreate.ScopeEnum = { Group: "GROUP" };
|
|
73
|
+
})(GroupQuotaCreate || (GroupQuotaCreate = {}));
|
|
74
|
+
//#endregion
|
|
24
75
|
//#region generated/openapi/model/group-requirement-rule.ts
|
|
25
76
|
let GroupRequirementRule;
|
|
26
77
|
(function(_GroupRequirementRule) {
|
|
@@ -33,6 +84,26 @@ let GroupScope;
|
|
|
33
84
|
_GroupScope.TypeEnum = { Group: "group" };
|
|
34
85
|
})(GroupScope || (GroupScope = {}));
|
|
35
86
|
//#endregion
|
|
87
|
+
//#region generated/openapi/model/list-workflow-votes-params.ts
|
|
88
|
+
let ListWorkflowVotesParams;
|
|
89
|
+
(function(_ListWorkflowVotesParams) {
|
|
90
|
+
_ListWorkflowVotesParams.OrderByEnum = {
|
|
91
|
+
TimestampAsc: "TIMESTAMP:ASC",
|
|
92
|
+
TimestampDesc: "TIMESTAMP:DESC"
|
|
93
|
+
};
|
|
94
|
+
})(ListWorkflowVotesParams || (ListWorkflowVotesParams = {}));
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region generated/openapi/model/list-workflows-params.ts
|
|
97
|
+
let ListWorkflowsParams;
|
|
98
|
+
(function(_ListWorkflowsParams) {
|
|
99
|
+
_ListWorkflowsParams.OrderByEnum = {
|
|
100
|
+
CreatedAtAsc: "CREATED_AT:ASC",
|
|
101
|
+
CreatedAtDesc: "CREATED_AT:DESC",
|
|
102
|
+
UpdatedAtAsc: "UPDATED_AT:ASC",
|
|
103
|
+
UpdatedAtDesc: "UPDATED_AT:DESC"
|
|
104
|
+
};
|
|
105
|
+
})(ListWorkflowsParams || (ListWorkflowsParams = {}));
|
|
106
|
+
//#endregion
|
|
36
107
|
//#region generated/openapi/model/or-rule.ts
|
|
37
108
|
let OrRule;
|
|
38
109
|
(function(_OrRule) {
|
|
@@ -45,12 +116,94 @@ let OrgScope;
|
|
|
45
116
|
_OrgScope.TypeEnum = { Org: "org" };
|
|
46
117
|
})(OrgScope || (OrgScope = {}));
|
|
47
118
|
//#endregion
|
|
119
|
+
//#region generated/openapi/model/quota-scope.ts
|
|
120
|
+
const QuotaScope = {
|
|
121
|
+
Global: "GLOBAL",
|
|
122
|
+
Space: "SPACE",
|
|
123
|
+
User: "USER",
|
|
124
|
+
Group: "GROUP",
|
|
125
|
+
Template: "TEMPLATE"
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region generated/openapi/model/quota-type.ts
|
|
129
|
+
const QuotaType = {
|
|
130
|
+
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
131
|
+
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS",
|
|
132
|
+
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
133
|
+
MaxGroups: "MAX_GROUPS",
|
|
134
|
+
MaxSpaces: "MAX_SPACES",
|
|
135
|
+
MaxTemplates: "MAX_TEMPLATES"
|
|
136
|
+
};
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region generated/openapi/model/space-quota.ts
|
|
139
|
+
let SpaceQuota;
|
|
140
|
+
(function(_SpaceQuota) {
|
|
141
|
+
_SpaceQuota.QuotaTypeEnum = { MaxTemplates: "MAX_TEMPLATES" };
|
|
142
|
+
_SpaceQuota.ScopeEnum = { Space: "SPACE" };
|
|
143
|
+
})(SpaceQuota || (SpaceQuota = {}));
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region generated/openapi/model/space-quota-base.ts
|
|
146
|
+
let SpaceQuotaBase;
|
|
147
|
+
(function(_SpaceQuotaBase) {
|
|
148
|
+
_SpaceQuotaBase.ScopeEnum = { Space: "SPACE" };
|
|
149
|
+
_SpaceQuotaBase.QuotaTypeEnum = { MaxTemplates: "MAX_TEMPLATES" };
|
|
150
|
+
})(SpaceQuotaBase || (SpaceQuotaBase = {}));
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region generated/openapi/model/space-quota-create.ts
|
|
153
|
+
let SpaceQuotaCreate;
|
|
154
|
+
(function(_SpaceQuotaCreate) {
|
|
155
|
+
_SpaceQuotaCreate.QuotaTypeEnum = { MaxTemplates: "MAX_TEMPLATES" };
|
|
156
|
+
_SpaceQuotaCreate.ScopeEnum = { Space: "SPACE" };
|
|
157
|
+
})(SpaceQuotaCreate || (SpaceQuotaCreate = {}));
|
|
158
|
+
//#endregion
|
|
48
159
|
//#region generated/openapi/model/space-scope.ts
|
|
49
160
|
let SpaceScope;
|
|
50
161
|
(function(_SpaceScope) {
|
|
51
162
|
_SpaceScope.TypeEnum = { Space: "space" };
|
|
52
163
|
})(SpaceScope || (SpaceScope = {}));
|
|
53
164
|
//#endregion
|
|
165
|
+
//#region generated/openapi/model/template-quota.ts
|
|
166
|
+
let TemplateQuota;
|
|
167
|
+
(function(_TemplateQuota) {
|
|
168
|
+
_TemplateQuota.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
169
|
+
_TemplateQuota.ScopeEnum = { Template: "TEMPLATE" };
|
|
170
|
+
})(TemplateQuota || (TemplateQuota = {}));
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region generated/openapi/model/template-quota-base.ts
|
|
173
|
+
let TemplateQuotaBase;
|
|
174
|
+
(function(_TemplateQuotaBase) {
|
|
175
|
+
_TemplateQuotaBase.ScopeEnum = { Template: "TEMPLATE" };
|
|
176
|
+
_TemplateQuotaBase.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
177
|
+
})(TemplateQuotaBase || (TemplateQuotaBase = {}));
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region generated/openapi/model/template-quota-create.ts
|
|
180
|
+
let TemplateQuotaCreate;
|
|
181
|
+
(function(_TemplateQuotaCreate) {
|
|
182
|
+
_TemplateQuotaCreate.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
183
|
+
_TemplateQuotaCreate.ScopeEnum = { Template: "TEMPLATE" };
|
|
184
|
+
})(TemplateQuotaCreate || (TemplateQuotaCreate = {}));
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region generated/openapi/model/user-quota.ts
|
|
187
|
+
let UserQuota;
|
|
188
|
+
(function(_UserQuota) {
|
|
189
|
+
_UserQuota.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
190
|
+
_UserQuota.ScopeEnum = { User: "USER" };
|
|
191
|
+
})(UserQuota || (UserQuota = {}));
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region generated/openapi/model/user-quota-base.ts
|
|
194
|
+
let UserQuotaBase;
|
|
195
|
+
(function(_UserQuotaBase) {
|
|
196
|
+
_UserQuotaBase.ScopeEnum = { User: "USER" };
|
|
197
|
+
_UserQuotaBase.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
198
|
+
})(UserQuotaBase || (UserQuotaBase = {}));
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region generated/openapi/model/user-quota-create.ts
|
|
201
|
+
let UserQuotaCreate;
|
|
202
|
+
(function(_UserQuotaCreate) {
|
|
203
|
+
_UserQuotaCreate.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
204
|
+
_UserQuotaCreate.ScopeEnum = { User: "USER" };
|
|
205
|
+
})(UserQuotaCreate || (UserQuotaCreate = {}));
|
|
206
|
+
//#endregion
|
|
54
207
|
//#region generated/openapi/model/vote-approve.ts
|
|
55
208
|
let VoteApprove;
|
|
56
209
|
(function(_VoteApprove) {
|
|
@@ -115,6 +268,8 @@ function isStringBigInt(value) {
|
|
|
115
268
|
}
|
|
116
269
|
return true;
|
|
117
270
|
}
|
|
271
|
+
const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
272
|
+
const isUUIDv4 = (value) => value.match(UUID_REGEX) !== null;
|
|
118
273
|
//#endregion
|
|
119
274
|
//#region src/validators/auth.validators.ts
|
|
120
275
|
function validateTokenResponse(object) {
|
|
@@ -203,6 +358,11 @@ function validateOidcCallbackRequest(object) {
|
|
|
203
358
|
});
|
|
204
359
|
}
|
|
205
360
|
//#endregion
|
|
361
|
+
//#region src/utils/enum.ts
|
|
362
|
+
function getStringAsEnum(str, enumType) {
|
|
363
|
+
if (Object.values(enumType).includes(str)) return str;
|
|
364
|
+
}
|
|
365
|
+
//#endregion
|
|
206
366
|
//#region src/validators/groups.validators.ts
|
|
207
367
|
function validateGroup(object) {
|
|
208
368
|
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
@@ -415,11 +575,6 @@ function validateGetEntityInfo200Response(object) {
|
|
|
415
575
|
});
|
|
416
576
|
}
|
|
417
577
|
//#endregion
|
|
418
|
-
//#region src/utils/enum.ts
|
|
419
|
-
function getStringAsEnum(str, enumType) {
|
|
420
|
-
if (Object.values(enumType).includes(str)) return str;
|
|
421
|
-
}
|
|
422
|
-
//#endregion
|
|
423
578
|
//#region src/utils/types.ts
|
|
424
579
|
function prefixLeft(prefix, value) {
|
|
425
580
|
return `${prefix}_${value}`;
|
|
@@ -930,9 +1085,41 @@ function validateListWorkflowsParams(object) {
|
|
|
930
1085
|
if (typeof val !== "string") return left("invalid_workflow_template_identifier");
|
|
931
1086
|
workflowTemplateIdentifier = val;
|
|
932
1087
|
}
|
|
1088
|
+
let includeGroups = void 0;
|
|
1089
|
+
if (hasOwnProperty(object, "includeGroups")) {
|
|
1090
|
+
const includeGroupsVal = typeof object.includeGroups === "string" ? [object.includeGroups] : object.includeGroups;
|
|
1091
|
+
if (!isArray(includeGroupsVal)) return left("invalid_include_groups");
|
|
1092
|
+
const validatedIncludeGroups = [];
|
|
1093
|
+
for (const item of includeGroupsVal) {
|
|
1094
|
+
if (typeof item !== "string") return left("invalid_include_groups");
|
|
1095
|
+
if (!isUUIDv4(item)) return left("invalid_include_groups");
|
|
1096
|
+
validatedIncludeGroups.push(item);
|
|
1097
|
+
}
|
|
1098
|
+
includeGroups = validatedIncludeGroups;
|
|
1099
|
+
}
|
|
1100
|
+
let orderBy = void 0;
|
|
1101
|
+
if (hasOwnProperty(object, "orderBy")) {
|
|
1102
|
+
const orderByVal = typeof object.orderBy === "string" ? [object.orderBy] : object.orderBy;
|
|
1103
|
+
if (!isArray(orderByVal)) return left("invalid_order_by");
|
|
1104
|
+
if (orderByVal.length > 3) return left("too_many_order_by_items");
|
|
1105
|
+
const validatedOrderBy = [];
|
|
1106
|
+
const seenFields = /* @__PURE__ */ new Set();
|
|
1107
|
+
for (const item of orderByVal) {
|
|
1108
|
+
if (typeof item !== "string") return left("invalid_order_by");
|
|
1109
|
+
const enumVal = getStringAsEnum(item, ListWorkflowsParams.OrderByEnum);
|
|
1110
|
+
if (enumVal === void 0) return left("invalid_order_by");
|
|
1111
|
+
const field = enumVal.split(":")[0];
|
|
1112
|
+
if (seenFields.has(field)) return left("duplicate_order_by_fields");
|
|
1113
|
+
seenFields.add(field);
|
|
1114
|
+
validatedOrderBy.push(enumVal);
|
|
1115
|
+
}
|
|
1116
|
+
orderBy = validatedOrderBy;
|
|
1117
|
+
}
|
|
933
1118
|
if (include !== void 0) result.include = include;
|
|
934
1119
|
if (includeOnlyNonTerminalState !== void 0) result.includeOnlyNonTerminalState = includeOnlyNonTerminalState;
|
|
935
1120
|
if (workflowTemplateIdentifier !== void 0) result.workflowTemplateIdentifier = workflowTemplateIdentifier;
|
|
1121
|
+
if (includeGroups !== void 0) result.includeGroups = includeGroups;
|
|
1122
|
+
if (orderBy !== void 0) result.orderBy = orderBy;
|
|
936
1123
|
return right(result);
|
|
937
1124
|
}
|
|
938
1125
|
function validateListWorkflows200Response(object) {
|
|
@@ -1075,6 +1262,32 @@ function validateGetWorkflowVotes200Response(object) {
|
|
|
1075
1262
|
}
|
|
1076
1263
|
return right({ votes });
|
|
1077
1264
|
}
|
|
1265
|
+
function validateListWorkflowVotesParams(object) {
|
|
1266
|
+
const sharedValidation = pipe(validateSharedListParams(object), mapLeft((error) => error === "invalid_search" ? "malformed_object" : error));
|
|
1267
|
+
if (isLeft(sharedValidation)) return left(sharedValidation.left);
|
|
1268
|
+
const result = sharedValidation.right;
|
|
1269
|
+
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
1270
|
+
let orderBy = void 0;
|
|
1271
|
+
if (hasOwnProperty(object, "orderBy")) {
|
|
1272
|
+
const orderByVal = typeof object.orderBy === "string" ? [object.orderBy] : object.orderBy;
|
|
1273
|
+
if (!isArray(orderByVal)) return left("invalid_order_by");
|
|
1274
|
+
if (orderByVal.length > 3) return left("too_many_order_by_items");
|
|
1275
|
+
const validatedOrderBy = [];
|
|
1276
|
+
const seenFields = /* @__PURE__ */ new Set();
|
|
1277
|
+
for (const item of orderByVal) {
|
|
1278
|
+
if (typeof item !== "string") return left("invalid_order_by");
|
|
1279
|
+
const enumVal = getStringAsEnum(item, ListWorkflowVotesParams.OrderByEnum);
|
|
1280
|
+
if (enumVal === void 0) return left("invalid_order_by");
|
|
1281
|
+
const field = enumVal.split(":")[0];
|
|
1282
|
+
if (seenFields.has(field)) return left("duplicate_order_by_fields");
|
|
1283
|
+
seenFields.add(field);
|
|
1284
|
+
validatedOrderBy.push(enumVal);
|
|
1285
|
+
}
|
|
1286
|
+
orderBy = validatedOrderBy;
|
|
1287
|
+
}
|
|
1288
|
+
if (orderBy !== void 0) result.orderBy = orderBy;
|
|
1289
|
+
return right(result);
|
|
1290
|
+
}
|
|
1078
1291
|
//#endregion
|
|
1079
1292
|
//#region src/validators/users.validators.ts
|
|
1080
1293
|
function validateUser(object) {
|
|
@@ -1461,4 +1674,78 @@ function isAPIError(object) {
|
|
|
1461
1674
|
return E.isRight(validateAPIError(object));
|
|
1462
1675
|
}
|
|
1463
1676
|
//#endregion
|
|
1464
|
-
|
|
1677
|
+
//#region src/validators/quota.validator.ts
|
|
1678
|
+
function validateQuotaCreate(object) {
|
|
1679
|
+
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
1680
|
+
if (!hasOwnProperty(object, "limit")) return left("missing_limit");
|
|
1681
|
+
if (!isNumber(object.limit) || !Number.isInteger(object.limit) || object.limit < 0) return left("invalid_limit");
|
|
1682
|
+
if (!hasOwnProperty(object, "scope")) return left("missing_scope");
|
|
1683
|
+
if (!isNonEmptyString(object.scope)) return left("invalid_scope");
|
|
1684
|
+
if (!hasOwnProperty(object, "quotaType")) return left("missing_quotaType");
|
|
1685
|
+
if (!isNonEmptyString(object.quotaType)) return left("invalid_quotaType");
|
|
1686
|
+
const limit = object.limit;
|
|
1687
|
+
const scopeStr = object.scope;
|
|
1688
|
+
if (typeof scopeStr !== "string") return left("invalid_scope");
|
|
1689
|
+
const scope = getStringAsEnum(scopeStr, QuotaScope);
|
|
1690
|
+
if (!scope) return left("invalid_scope");
|
|
1691
|
+
const quotaTypeStr = object.quotaType;
|
|
1692
|
+
if (typeof quotaTypeStr !== "string") return left("invalid_quotaType");
|
|
1693
|
+
const quotaType = getStringAsEnum(quotaTypeStr, QuotaType);
|
|
1694
|
+
if (!quotaType) return left("invalid_quotaType");
|
|
1695
|
+
if (scope === "GLOBAL") {
|
|
1696
|
+
if (quotaType !== "MAX_GROUPS" && quotaType !== "MAX_SPACES") return left("invalid_scope_quotaType_combination");
|
|
1697
|
+
if (hasOwnProperty(object, "targetId") && object.targetId !== void 0) return left("invalid_scope_targetId_combination");
|
|
1698
|
+
return right({
|
|
1699
|
+
limit,
|
|
1700
|
+
scope,
|
|
1701
|
+
quotaType
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
if (!hasOwnProperty(object, "targetId")) return left("missing_targetId");
|
|
1705
|
+
if (!isNonEmptyString(object.targetId) || !isUUIDv4(object.targetId)) return left("invalid_targetId");
|
|
1706
|
+
if (scope === "GROUP") {
|
|
1707
|
+
if (quotaType !== "MAX_ENTITIES_PER_GROUP") return left("invalid_scope_quotaType_combination");
|
|
1708
|
+
return right({
|
|
1709
|
+
limit,
|
|
1710
|
+
scope,
|
|
1711
|
+
quotaType,
|
|
1712
|
+
targetId: object.targetId
|
|
1713
|
+
});
|
|
1714
|
+
}
|
|
1715
|
+
if (scope === "TEMPLATE") {
|
|
1716
|
+
if (quotaType !== "MAX_CONCURRENT_WORKFLOWS") return left("invalid_scope_quotaType_combination");
|
|
1717
|
+
return right({
|
|
1718
|
+
limit,
|
|
1719
|
+
scope,
|
|
1720
|
+
quotaType,
|
|
1721
|
+
targetId: object.targetId
|
|
1722
|
+
});
|
|
1723
|
+
}
|
|
1724
|
+
if (scope === "USER") {
|
|
1725
|
+
if (quotaType !== "MAX_ROLES_PER_USER") return left("invalid_scope_quotaType_combination");
|
|
1726
|
+
return right({
|
|
1727
|
+
limit,
|
|
1728
|
+
scope,
|
|
1729
|
+
quotaType,
|
|
1730
|
+
targetId: object.targetId
|
|
1731
|
+
});
|
|
1732
|
+
}
|
|
1733
|
+
if (scope === "SPACE") {
|
|
1734
|
+
if (quotaType !== "MAX_TEMPLATES") return left("invalid_scope_quotaType_combination");
|
|
1735
|
+
return right({
|
|
1736
|
+
limit,
|
|
1737
|
+
scope,
|
|
1738
|
+
quotaType,
|
|
1739
|
+
targetId: object.targetId
|
|
1740
|
+
});
|
|
1741
|
+
}
|
|
1742
|
+
return left("invalid_scope_quotaType_combination");
|
|
1743
|
+
}
|
|
1744
|
+
function validateQuotaUpdate(object) {
|
|
1745
|
+
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
1746
|
+
if (!hasOwnProperty(object, "limit") || object.limit === void 0) return right({});
|
|
1747
|
+
if (!isNumber(object.limit) || !Number.isInteger(object.limit) || object.limit < 0) return left("invalid_limit");
|
|
1748
|
+
return right({ limit: object.limit });
|
|
1749
|
+
}
|
|
1750
|
+
//#endregion
|
|
1751
|
+
export { AgentTokenRequest, AndRule, EmailAction, GlobalQuota, GlobalQuotaBase, GlobalQuotaCreate, GroupQuota, GroupQuotaBase, GroupQuotaCreate, GroupRequirementRule, GroupScope, ListWorkflowVotesParams, ListWorkflowsParams, OrRule, OrgScope, QuotaScope, QuotaType, SortBy, SortDirection, SpaceQuota, SpaceQuotaBase, SpaceQuotaCreate, SpaceScope, TemplateQuota, TemplateQuotaBase, TemplateQuotaCreate, UserQuota, UserQuotaBase, UserQuotaCreate, 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, validateQuotaCreate, validateQuotaUpdate, 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.37
|
|
28
28
|
*
|
|
29
29
|
*
|
|
30
30
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -96,7 +96,7 @@ declare namespace AndRule {
|
|
|
96
96
|
* Workflow Approval System API
|
|
97
97
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
98
98
|
*
|
|
99
|
-
* The version of the OpenAPI document: 0.0.
|
|
99
|
+
* The version of the OpenAPI document: 0.0.37
|
|
100
100
|
*
|
|
101
101
|
*
|
|
102
102
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -115,7 +115,7 @@ interface ConcurrencyControl {
|
|
|
115
115
|
* Workflow Approval System API
|
|
116
116
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
117
117
|
*
|
|
118
|
-
* The version of the OpenAPI document: 0.0.
|
|
118
|
+
* The version of the OpenAPI document: 0.0.37
|
|
119
119
|
*
|
|
120
120
|
*
|
|
121
121
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -147,7 +147,7 @@ declare namespace EmailAction {
|
|
|
147
147
|
* Workflow Approval System API
|
|
148
148
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
149
149
|
*
|
|
150
|
-
* The version of the OpenAPI document: 0.0.
|
|
150
|
+
* The version of the OpenAPI document: 0.0.37
|
|
151
151
|
*
|
|
152
152
|
*
|
|
153
153
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -164,7 +164,7 @@ interface GroupInfo {
|
|
|
164
164
|
* Workflow Approval System API
|
|
165
165
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
166
166
|
*
|
|
167
|
-
* The version of the OpenAPI document: 0.0.
|
|
167
|
+
* The version of the OpenAPI document: 0.0.37
|
|
168
168
|
*
|
|
169
169
|
*
|
|
170
170
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -203,7 +203,7 @@ interface Group {
|
|
|
203
203
|
* Workflow Approval System API
|
|
204
204
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
205
205
|
*
|
|
206
|
-
* The version of the OpenAPI document: 0.0.
|
|
206
|
+
* The version of the OpenAPI document: 0.0.37
|
|
207
207
|
*
|
|
208
208
|
*
|
|
209
209
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -236,7 +236,7 @@ interface ListGroups200Response {
|
|
|
236
236
|
* Workflow Approval System API
|
|
237
237
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
238
238
|
*
|
|
239
|
-
* The version of the OpenAPI document: 0.0.
|
|
239
|
+
* The version of the OpenAPI document: 0.0.37
|
|
240
240
|
*
|
|
241
241
|
*
|
|
242
242
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -263,7 +263,7 @@ interface UserSummary {
|
|
|
263
263
|
* Workflow Approval System API
|
|
264
264
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
265
265
|
*
|
|
266
|
-
* The version of the OpenAPI document: 0.0.
|
|
266
|
+
* The version of the OpenAPI document: 0.0.37
|
|
267
267
|
*
|
|
268
268
|
*
|
|
269
269
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -285,7 +285,7 @@ declare const WorkflowTemplateStatus: {
|
|
|
285
285
|
* Workflow Approval System API
|
|
286
286
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
287
287
|
*
|
|
288
|
-
* The version of the OpenAPI document: 0.0.
|
|
288
|
+
* The version of the OpenAPI document: 0.0.37
|
|
289
289
|
*
|
|
290
290
|
*
|
|
291
291
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -451,7 +451,7 @@ interface ListWorkflows200Response {
|
|
|
451
451
|
* Workflow Approval System API
|
|
452
452
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
453
453
|
*
|
|
454
|
-
* The version of the OpenAPI document: 0.0.
|
|
454
|
+
* The version of the OpenAPI document: 0.0.37
|
|
455
455
|
*
|
|
456
456
|
*
|
|
457
457
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -474,7 +474,7 @@ interface TokenResponse {
|
|
|
474
474
|
* Workflow Approval System API
|
|
475
475
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
476
476
|
*
|
|
477
|
-
* The version of the OpenAPI document: 0.0.
|
|
477
|
+
* The version of the OpenAPI document: 0.0.37
|
|
478
478
|
*
|
|
479
479
|
*
|
|
480
480
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -509,7 +509,7 @@ interface User {
|
|
|
509
509
|
* Workflow Approval System API
|
|
510
510
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
511
511
|
*
|
|
512
|
-
* The version of the OpenAPI document: 0.0.
|
|
512
|
+
* The version of the OpenAPI document: 0.0.37
|
|
513
513
|
*
|
|
514
514
|
*
|
|
515
515
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -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.37
|
|
28
28
|
*
|
|
29
29
|
*
|
|
30
30
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -96,7 +96,7 @@ declare namespace AndRule {
|
|
|
96
96
|
* Workflow Approval System API
|
|
97
97
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
98
98
|
*
|
|
99
|
-
* The version of the OpenAPI document: 0.0.
|
|
99
|
+
* The version of the OpenAPI document: 0.0.37
|
|
100
100
|
*
|
|
101
101
|
*
|
|
102
102
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -115,7 +115,7 @@ interface ConcurrencyControl {
|
|
|
115
115
|
* Workflow Approval System API
|
|
116
116
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
117
117
|
*
|
|
118
|
-
* The version of the OpenAPI document: 0.0.
|
|
118
|
+
* The version of the OpenAPI document: 0.0.37
|
|
119
119
|
*
|
|
120
120
|
*
|
|
121
121
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -147,7 +147,7 @@ declare namespace EmailAction {
|
|
|
147
147
|
* Workflow Approval System API
|
|
148
148
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
149
149
|
*
|
|
150
|
-
* The version of the OpenAPI document: 0.0.
|
|
150
|
+
* The version of the OpenAPI document: 0.0.37
|
|
151
151
|
*
|
|
152
152
|
*
|
|
153
153
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -164,7 +164,7 @@ interface GroupInfo {
|
|
|
164
164
|
* Workflow Approval System API
|
|
165
165
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
166
166
|
*
|
|
167
|
-
* The version of the OpenAPI document: 0.0.
|
|
167
|
+
* The version of the OpenAPI document: 0.0.37
|
|
168
168
|
*
|
|
169
169
|
*
|
|
170
170
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -203,7 +203,7 @@ interface Group {
|
|
|
203
203
|
* Workflow Approval System API
|
|
204
204
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
205
205
|
*
|
|
206
|
-
* The version of the OpenAPI document: 0.0.
|
|
206
|
+
* The version of the OpenAPI document: 0.0.37
|
|
207
207
|
*
|
|
208
208
|
*
|
|
209
209
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -236,7 +236,7 @@ interface ListGroups200Response {
|
|
|
236
236
|
* Workflow Approval System API
|
|
237
237
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
238
238
|
*
|
|
239
|
-
* The version of the OpenAPI document: 0.0.
|
|
239
|
+
* The version of the OpenAPI document: 0.0.37
|
|
240
240
|
*
|
|
241
241
|
*
|
|
242
242
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -263,7 +263,7 @@ interface UserSummary {
|
|
|
263
263
|
* Workflow Approval System API
|
|
264
264
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
265
265
|
*
|
|
266
|
-
* The version of the OpenAPI document: 0.0.
|
|
266
|
+
* The version of the OpenAPI document: 0.0.37
|
|
267
267
|
*
|
|
268
268
|
*
|
|
269
269
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -285,7 +285,7 @@ declare const WorkflowTemplateStatus: {
|
|
|
285
285
|
* Workflow Approval System API
|
|
286
286
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
287
287
|
*
|
|
288
|
-
* The version of the OpenAPI document: 0.0.
|
|
288
|
+
* The version of the OpenAPI document: 0.0.37
|
|
289
289
|
*
|
|
290
290
|
*
|
|
291
291
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -451,7 +451,7 @@ interface ListWorkflows200Response {
|
|
|
451
451
|
* Workflow Approval System API
|
|
452
452
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
453
453
|
*
|
|
454
|
-
* The version of the OpenAPI document: 0.0.
|
|
454
|
+
* The version of the OpenAPI document: 0.0.37
|
|
455
455
|
*
|
|
456
456
|
*
|
|
457
457
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -474,7 +474,7 @@ interface TokenResponse {
|
|
|
474
474
|
* Workflow Approval System API
|
|
475
475
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
476
476
|
*
|
|
477
|
-
* The version of the OpenAPI document: 0.0.
|
|
477
|
+
* The version of the OpenAPI document: 0.0.37
|
|
478
478
|
*
|
|
479
479
|
*
|
|
480
480
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -509,7 +509,7 @@ interface User {
|
|
|
509
509
|
* Workflow Approval System API
|
|
510
510
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
511
511
|
*
|
|
512
|
-
* The version of the OpenAPI document: 0.0.
|
|
512
|
+
* The version of the OpenAPI document: 0.0.37
|
|
513
513
|
*
|
|
514
514
|
*
|
|
515
515
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|