@approvio/api 0.0.43 → 0.0.45
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 +224 -140
- package/dist/src/index.d.cts +510 -317
- package/dist/src/index.d.mts +510 -317
- package/dist/src/index.mjs +164 -117
- package/dist/{workflow-create-DJP5QYfz.d.cts → workflow-create-CC-JYERf.d.mts} +12 -12
- package/dist/{workflow-create-uX4n87mS.d.mts → workflow-create-i3n3vy4V.d.cts} +12 -12
- package/package.json +2 -2
package/dist/src/index.mjs
CHANGED
|
@@ -21,59 +21,17 @@ 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
|
-
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
31
|
-
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
32
|
-
MaxTemplates: "MAX_TEMPLATES",
|
|
33
|
-
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
34
|
-
};
|
|
35
|
-
_GlobalQuota.ScopeEnum = { Global: "GLOBAL" };
|
|
36
|
-
})(GlobalQuota || (GlobalQuota = {}));
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region generated/openapi/model/global-quota-base.ts
|
|
39
|
-
let GlobalQuotaBase;
|
|
40
|
-
(function(_GlobalQuotaBase) {
|
|
41
|
-
_GlobalQuotaBase.ScopeEnum = { Global: "GLOBAL" };
|
|
42
|
-
_GlobalQuotaBase.QuotaTypeEnum = {
|
|
43
|
-
MaxGroups: "MAX_GROUPS",
|
|
44
|
-
MaxSpaces: "MAX_SPACES",
|
|
45
|
-
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
46
|
-
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
47
|
-
MaxTemplates: "MAX_TEMPLATES",
|
|
48
|
-
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
49
|
-
};
|
|
50
|
-
})(GlobalQuotaBase || (GlobalQuotaBase = {}));
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region generated/openapi/model/global-quota-create.ts
|
|
53
|
-
let GlobalQuotaCreate;
|
|
54
|
-
(function(_GlobalQuotaCreate) {
|
|
55
|
-
_GlobalQuotaCreate.QuotaTypeEnum = {
|
|
56
|
-
MaxGroups: "MAX_GROUPS",
|
|
57
|
-
MaxSpaces: "MAX_SPACES",
|
|
58
|
-
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
59
|
-
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
60
|
-
MaxTemplates: "MAX_TEMPLATES",
|
|
61
|
-
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
62
|
-
};
|
|
63
|
-
_GlobalQuotaCreate.ScopeEnum = { Global: "GLOBAL" };
|
|
64
|
-
})(GlobalQuotaCreate || (GlobalQuotaCreate = {}));
|
|
65
|
-
//#endregion
|
|
66
24
|
//#region generated/openapi/model/group-quota.ts
|
|
67
25
|
let GroupQuota;
|
|
68
26
|
(function(_GroupQuota) {
|
|
69
27
|
_GroupQuota.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
70
|
-
_GroupQuota.ScopeEnum = { Group: "
|
|
28
|
+
_GroupQuota.ScopeEnum = { Group: "Group" };
|
|
71
29
|
})(GroupQuota || (GroupQuota = {}));
|
|
72
30
|
//#endregion
|
|
73
31
|
//#region generated/openapi/model/group-quota-base.ts
|
|
74
32
|
let GroupQuotaBase;
|
|
75
33
|
(function(_GroupQuotaBase) {
|
|
76
|
-
_GroupQuotaBase.ScopeEnum = { Group: "
|
|
34
|
+
_GroupQuotaBase.ScopeEnum = { Group: "Group" };
|
|
77
35
|
_GroupQuotaBase.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
78
36
|
})(GroupQuotaBase || (GroupQuotaBase = {}));
|
|
79
37
|
//#endregion
|
|
@@ -81,7 +39,7 @@ let GroupQuotaBase;
|
|
|
81
39
|
let GroupQuotaCreate;
|
|
82
40
|
(function(_GroupQuotaCreate) {
|
|
83
41
|
_GroupQuotaCreate.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
84
|
-
_GroupQuotaCreate.ScopeEnum = { Group: "
|
|
42
|
+
_GroupQuotaCreate.ScopeEnum = { Group: "Group" };
|
|
85
43
|
})(GroupQuotaCreate || (GroupQuotaCreate = {}));
|
|
86
44
|
//#endregion
|
|
87
45
|
//#region generated/openapi/model/group-requirement-rule.ts
|
|
@@ -122,6 +80,51 @@ let OrRule;
|
|
|
122
80
|
_OrRule.TypeEnum = { Or: "OR" };
|
|
123
81
|
})(OrRule || (OrRule = {}));
|
|
124
82
|
//#endregion
|
|
83
|
+
//#region generated/openapi/model/org-quota.ts
|
|
84
|
+
let OrgQuota;
|
|
85
|
+
(function(_OrgQuota) {
|
|
86
|
+
_OrgQuota.QuotaTypeEnum = {
|
|
87
|
+
MaxGroups: "MAX_GROUPS",
|
|
88
|
+
MaxSpaces: "MAX_SPACES",
|
|
89
|
+
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
90
|
+
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
91
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
92
|
+
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS",
|
|
93
|
+
MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW"
|
|
94
|
+
};
|
|
95
|
+
_OrgQuota.ScopeEnum = { Org: "Org" };
|
|
96
|
+
})(OrgQuota || (OrgQuota = {}));
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region generated/openapi/model/org-quota-base.ts
|
|
99
|
+
let OrgQuotaBase;
|
|
100
|
+
(function(_OrgQuotaBase) {
|
|
101
|
+
_OrgQuotaBase.ScopeEnum = { Org: "Org" };
|
|
102
|
+
_OrgQuotaBase.QuotaTypeEnum = {
|
|
103
|
+
MaxGroups: "MAX_GROUPS",
|
|
104
|
+
MaxSpaces: "MAX_SPACES",
|
|
105
|
+
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
106
|
+
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
107
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
108
|
+
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS",
|
|
109
|
+
MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW"
|
|
110
|
+
};
|
|
111
|
+
})(OrgQuotaBase || (OrgQuotaBase = {}));
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region generated/openapi/model/org-quota-create.ts
|
|
114
|
+
let OrgQuotaCreate;
|
|
115
|
+
(function(_OrgQuotaCreate) {
|
|
116
|
+
_OrgQuotaCreate.QuotaTypeEnum = {
|
|
117
|
+
MaxGroups: "MAX_GROUPS",
|
|
118
|
+
MaxSpaces: "MAX_SPACES",
|
|
119
|
+
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
120
|
+
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
121
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
122
|
+
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS",
|
|
123
|
+
MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW"
|
|
124
|
+
};
|
|
125
|
+
_OrgQuotaCreate.ScopeEnum = { Org: "Org" };
|
|
126
|
+
})(OrgQuotaCreate || (OrgQuotaCreate = {}));
|
|
127
|
+
//#endregion
|
|
125
128
|
//#region generated/openapi/model/org-scope.ts
|
|
126
129
|
let OrgScope;
|
|
127
130
|
(function(_OrgScope) {
|
|
@@ -130,10 +133,12 @@ let OrgScope;
|
|
|
130
133
|
//#endregion
|
|
131
134
|
//#region generated/openapi/model/quota-scope.ts
|
|
132
135
|
const QuotaScope = {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
Org: "Org",
|
|
137
|
+
Group: "Group",
|
|
138
|
+
Space: "Space",
|
|
139
|
+
WorkflowTemplate: "WorkflowTemplate",
|
|
140
|
+
Workflow: "Workflow",
|
|
141
|
+
User: "User"
|
|
137
142
|
};
|
|
138
143
|
//#endregion
|
|
139
144
|
//#region generated/openapi/model/quota-type.ts
|
|
@@ -143,25 +148,26 @@ const QuotaType = {
|
|
|
143
148
|
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
144
149
|
MaxGroups: "MAX_GROUPS",
|
|
145
150
|
MaxSpaces: "MAX_SPACES",
|
|
146
|
-
|
|
151
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
152
|
+
MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW"
|
|
147
153
|
};
|
|
148
154
|
//#endregion
|
|
149
155
|
//#region generated/openapi/model/space-quota.ts
|
|
150
156
|
let SpaceQuota;
|
|
151
157
|
(function(_SpaceQuota) {
|
|
152
158
|
_SpaceQuota.QuotaTypeEnum = {
|
|
153
|
-
|
|
159
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
154
160
|
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
155
161
|
};
|
|
156
|
-
_SpaceQuota.ScopeEnum = { Space: "
|
|
162
|
+
_SpaceQuota.ScopeEnum = { Space: "Space" };
|
|
157
163
|
})(SpaceQuota || (SpaceQuota = {}));
|
|
158
164
|
//#endregion
|
|
159
165
|
//#region generated/openapi/model/space-quota-base.ts
|
|
160
166
|
let SpaceQuotaBase;
|
|
161
167
|
(function(_SpaceQuotaBase) {
|
|
162
|
-
_SpaceQuotaBase.ScopeEnum = { Space: "
|
|
168
|
+
_SpaceQuotaBase.ScopeEnum = { Space: "Space" };
|
|
163
169
|
_SpaceQuotaBase.QuotaTypeEnum = {
|
|
164
|
-
|
|
170
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
165
171
|
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
166
172
|
};
|
|
167
173
|
})(SpaceQuotaBase || (SpaceQuotaBase = {}));
|
|
@@ -170,10 +176,10 @@ let SpaceQuotaBase;
|
|
|
170
176
|
let SpaceQuotaCreate;
|
|
171
177
|
(function(_SpaceQuotaCreate) {
|
|
172
178
|
_SpaceQuotaCreate.QuotaTypeEnum = {
|
|
173
|
-
|
|
179
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
174
180
|
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
175
181
|
};
|
|
176
|
-
_SpaceQuotaCreate.ScopeEnum = { Space: "
|
|
182
|
+
_SpaceQuotaCreate.ScopeEnum = { Space: "Space" };
|
|
177
183
|
})(SpaceQuotaCreate || (SpaceQuotaCreate = {}));
|
|
178
184
|
//#endregion
|
|
179
185
|
//#region generated/openapi/model/space-scope.ts
|
|
@@ -182,26 +188,26 @@ let SpaceScope;
|
|
|
182
188
|
_SpaceScope.TypeEnum = { Space: "space" };
|
|
183
189
|
})(SpaceScope || (SpaceScope = {}));
|
|
184
190
|
//#endregion
|
|
185
|
-
//#region generated/openapi/model/
|
|
186
|
-
let
|
|
187
|
-
(function(
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
})(
|
|
191
|
+
//#region generated/openapi/model/user-quota.ts
|
|
192
|
+
let UserQuota;
|
|
193
|
+
(function(_UserQuota) {
|
|
194
|
+
_UserQuota.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
195
|
+
_UserQuota.ScopeEnum = { User: "User" };
|
|
196
|
+
})(UserQuota || (UserQuota = {}));
|
|
191
197
|
//#endregion
|
|
192
|
-
//#region generated/openapi/model/
|
|
193
|
-
let
|
|
194
|
-
(function(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
})(
|
|
198
|
+
//#region generated/openapi/model/user-quota-base.ts
|
|
199
|
+
let UserQuotaBase;
|
|
200
|
+
(function(_UserQuotaBase) {
|
|
201
|
+
_UserQuotaBase.ScopeEnum = { User: "User" };
|
|
202
|
+
_UserQuotaBase.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
203
|
+
})(UserQuotaBase || (UserQuotaBase = {}));
|
|
198
204
|
//#endregion
|
|
199
|
-
//#region generated/openapi/model/
|
|
200
|
-
let
|
|
201
|
-
(function(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
})(
|
|
205
|
+
//#region generated/openapi/model/user-quota-create.ts
|
|
206
|
+
let UserQuotaCreate;
|
|
207
|
+
(function(_UserQuotaCreate) {
|
|
208
|
+
_UserQuotaCreate.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
209
|
+
_UserQuotaCreate.ScopeEnum = { User: "User" };
|
|
210
|
+
})(UserQuotaCreate || (UserQuotaCreate = {}));
|
|
205
211
|
//#endregion
|
|
206
212
|
//#region generated/openapi/model/vote-approve.ts
|
|
207
213
|
let VoteApprove;
|
|
@@ -232,6 +238,48 @@ let WebhookAction;
|
|
|
232
238
|
};
|
|
233
239
|
})(WebhookAction || (WebhookAction = {}));
|
|
234
240
|
//#endregion
|
|
241
|
+
//#region generated/openapi/model/workflow-quota.ts
|
|
242
|
+
let WorkflowQuota;
|
|
243
|
+
(function(_WorkflowQuota) {
|
|
244
|
+
_WorkflowQuota.QuotaTypeEnum = { MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW" };
|
|
245
|
+
_WorkflowQuota.ScopeEnum = { Workflow: "Workflow" };
|
|
246
|
+
})(WorkflowQuota || (WorkflowQuota = {}));
|
|
247
|
+
//#endregion
|
|
248
|
+
//#region generated/openapi/model/workflow-quota-base.ts
|
|
249
|
+
let WorkflowQuotaBase;
|
|
250
|
+
(function(_WorkflowQuotaBase) {
|
|
251
|
+
_WorkflowQuotaBase.ScopeEnum = { Workflow: "Workflow" };
|
|
252
|
+
_WorkflowQuotaBase.QuotaTypeEnum = { MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW" };
|
|
253
|
+
})(WorkflowQuotaBase || (WorkflowQuotaBase = {}));
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region generated/openapi/model/workflow-quota-create.ts
|
|
256
|
+
let WorkflowQuotaCreate;
|
|
257
|
+
(function(_WorkflowQuotaCreate) {
|
|
258
|
+
_WorkflowQuotaCreate.QuotaTypeEnum = { MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW" };
|
|
259
|
+
_WorkflowQuotaCreate.ScopeEnum = { Workflow: "Workflow" };
|
|
260
|
+
})(WorkflowQuotaCreate || (WorkflowQuotaCreate = {}));
|
|
261
|
+
//#endregion
|
|
262
|
+
//#region generated/openapi/model/workflow-template-quota.ts
|
|
263
|
+
let WorkflowTemplateQuota;
|
|
264
|
+
(function(_WorkflowTemplateQuota) {
|
|
265
|
+
_WorkflowTemplateQuota.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
266
|
+
_WorkflowTemplateQuota.ScopeEnum = { WorkflowTemplate: "WorkflowTemplate" };
|
|
267
|
+
})(WorkflowTemplateQuota || (WorkflowTemplateQuota = {}));
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region generated/openapi/model/workflow-template-quota-base.ts
|
|
270
|
+
let WorkflowTemplateQuotaBase;
|
|
271
|
+
(function(_WorkflowTemplateQuotaBase) {
|
|
272
|
+
_WorkflowTemplateQuotaBase.ScopeEnum = { WorkflowTemplate: "WorkflowTemplate" };
|
|
273
|
+
_WorkflowTemplateQuotaBase.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
274
|
+
})(WorkflowTemplateQuotaBase || (WorkflowTemplateQuotaBase = {}));
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region generated/openapi/model/workflow-template-quota-create.ts
|
|
277
|
+
let WorkflowTemplateQuotaCreate;
|
|
278
|
+
(function(_WorkflowTemplateQuotaCreate) {
|
|
279
|
+
_WorkflowTemplateQuotaCreate.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
280
|
+
_WorkflowTemplateQuotaCreate.ScopeEnum = { WorkflowTemplate: "WorkflowTemplate" };
|
|
281
|
+
})(WorkflowTemplateQuotaCreate || (WorkflowTemplateQuotaCreate = {}));
|
|
282
|
+
//#endregion
|
|
235
283
|
//#region generated/openapi/model/workflow-template-scope.ts
|
|
236
284
|
let WorkflowTemplateScope;
|
|
237
285
|
(function(_WorkflowTemplateScope) {
|
|
@@ -1674,6 +1722,14 @@ function isAPIError(object) {
|
|
|
1674
1722
|
}
|
|
1675
1723
|
//#endregion
|
|
1676
1724
|
//#region src/validators/quota.validator.ts
|
|
1725
|
+
const QUOTA_TYPE_ENUM_BY_SCOPE = {
|
|
1726
|
+
Org: OrgQuotaBase.QuotaTypeEnum,
|
|
1727
|
+
Group: GroupQuotaBase.QuotaTypeEnum,
|
|
1728
|
+
Space: SpaceQuotaBase.QuotaTypeEnum,
|
|
1729
|
+
WorkflowTemplate: WorkflowTemplateQuotaBase.QuotaTypeEnum,
|
|
1730
|
+
Workflow: WorkflowQuotaBase.QuotaTypeEnum,
|
|
1731
|
+
User: UserQuotaBase.QuotaTypeEnum
|
|
1732
|
+
};
|
|
1677
1733
|
function validateQuotaCreate(object) {
|
|
1678
1734
|
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
1679
1735
|
if (!hasOwnProperty(object, "limit")) return left("missing_limit");
|
|
@@ -1684,52 +1740,20 @@ function validateQuotaCreate(object) {
|
|
|
1684
1740
|
if (!isNonEmptyString(object.quotaType)) return left("invalid_quotaType");
|
|
1685
1741
|
const limit = object.limit;
|
|
1686
1742
|
const scopeStr = object.scope;
|
|
1687
|
-
|
|
1743
|
+
const quotaTypeStr = object.quotaType;
|
|
1688
1744
|
const scope = getStringAsEnum(scopeStr, QuotaScope);
|
|
1689
1745
|
if (!scope) return left("invalid_scope");
|
|
1690
|
-
const quotaTypeStr = object.quotaType;
|
|
1691
|
-
if (typeof quotaTypeStr !== "string") return left("invalid_quotaType");
|
|
1692
|
-
const quotaType = getStringAsEnum(quotaTypeStr, QuotaType);
|
|
1693
|
-
if (!quotaType) return left("invalid_quotaType");
|
|
1694
|
-
if (scope === "GLOBAL") {
|
|
1695
|
-
if (quotaType !== "MAX_GROUPS" && quotaType !== "MAX_SPACES" && quotaType !== "MAX_ROLES_PER_USER" && quotaType !== "MAX_ENTITIES_PER_GROUP" && quotaType !== "MAX_TEMPLATES" && quotaType !== "MAX_CONCURRENT_WORKFLOWS") return left("invalid_scope_quotaType_combination");
|
|
1696
|
-
if (hasOwnProperty(object, "targetId") && object.targetId !== void 0) return left("invalid_scope_targetId_combination");
|
|
1697
|
-
return right({
|
|
1698
|
-
limit,
|
|
1699
|
-
scope,
|
|
1700
|
-
quotaType
|
|
1701
|
-
});
|
|
1702
|
-
}
|
|
1703
1746
|
if (!hasOwnProperty(object, "targetId")) return left("missing_targetId");
|
|
1704
1747
|
if (!isNonEmptyString(object.targetId) || !isUUIDv4(object.targetId)) return left("invalid_targetId");
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
}
|
|
1714
|
-
if (scope === "TEMPLATE") {
|
|
1715
|
-
if (quotaType !== "MAX_CONCURRENT_WORKFLOWS") return left("invalid_scope_quotaType_combination");
|
|
1716
|
-
return right({
|
|
1717
|
-
limit,
|
|
1718
|
-
scope,
|
|
1719
|
-
quotaType,
|
|
1720
|
-
targetId: object.targetId
|
|
1721
|
-
});
|
|
1722
|
-
}
|
|
1723
|
-
if (scope === "SPACE") {
|
|
1724
|
-
if (quotaType !== "MAX_TEMPLATES" && quotaType !== "MAX_CONCURRENT_WORKFLOWS") return left("invalid_scope_quotaType_combination");
|
|
1725
|
-
return right({
|
|
1726
|
-
limit,
|
|
1727
|
-
scope,
|
|
1728
|
-
quotaType,
|
|
1729
|
-
targetId: object.targetId
|
|
1730
|
-
});
|
|
1731
|
-
}
|
|
1732
|
-
return left("invalid_scope_quotaType_combination");
|
|
1748
|
+
const targetId = object.targetId;
|
|
1749
|
+
const quotaType = getStringAsEnum(quotaTypeStr, QUOTA_TYPE_ENUM_BY_SCOPE[scope]);
|
|
1750
|
+
if (quotaType === void 0) return left("invalid_scope_quotaType_combination");
|
|
1751
|
+
return right({
|
|
1752
|
+
limit,
|
|
1753
|
+
scope,
|
|
1754
|
+
quotaType,
|
|
1755
|
+
targetId
|
|
1756
|
+
});
|
|
1733
1757
|
}
|
|
1734
1758
|
function validateQuotaUpdate(object) {
|
|
1735
1759
|
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
@@ -1737,5 +1761,28 @@ function validateQuotaUpdate(object) {
|
|
|
1737
1761
|
if (!isNumber(object.limit) || !Number.isInteger(object.limit) || object.limit < 0) return left("invalid_limit");
|
|
1738
1762
|
return right({ limit: object.limit });
|
|
1739
1763
|
}
|
|
1764
|
+
function validateListQuotasParams(object) {
|
|
1765
|
+
const eitherSharedParams = validateSharedListParams(object);
|
|
1766
|
+
if (isLeft(eitherSharedParams)) return eitherSharedParams;
|
|
1767
|
+
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
1768
|
+
const result = { ...eitherSharedParams.right };
|
|
1769
|
+
if (hasOwnProperty(object, "scope") && object.scope !== void 0) {
|
|
1770
|
+
if (!isNonEmptyString(object.scope)) return left("invalid_scope");
|
|
1771
|
+
const scope = getStringAsEnum(object.scope, QuotaScope);
|
|
1772
|
+
if (!scope) return left("invalid_scope");
|
|
1773
|
+
result.scope = scope;
|
|
1774
|
+
}
|
|
1775
|
+
if (hasOwnProperty(object, "targetId") && object.targetId !== void 0) {
|
|
1776
|
+
if (!isNonEmptyString(object.targetId) || !isUUIDv4(object.targetId)) return left("invalid_targetId");
|
|
1777
|
+
result.targetId = object.targetId;
|
|
1778
|
+
}
|
|
1779
|
+
if (hasOwnProperty(object, "quotaType") && object.quotaType !== void 0) {
|
|
1780
|
+
if (!isNonEmptyString(object.quotaType)) return left("invalid_quotaType");
|
|
1781
|
+
const quotaType = getStringAsEnum(object.quotaType, QuotaType);
|
|
1782
|
+
if (!quotaType) return left("invalid_quotaType");
|
|
1783
|
+
result.quotaType = quotaType;
|
|
1784
|
+
}
|
|
1785
|
+
return right(result);
|
|
1786
|
+
}
|
|
1740
1787
|
//#endregion
|
|
1741
|
-
export { AgentTokenRequest, AndRule, EmailAction,
|
|
1788
|
+
export { AgentTokenRequest, AndRule, EmailAction, GroupQuota, GroupQuotaBase, GroupQuotaCreate, GroupRequirementRule, GroupScope, ListWorkflowVotesParams, ListWorkflowsParams, OrRule, OrgQuota, OrgQuotaBase, OrgQuotaCreate, OrgScope, QuotaScope, QuotaType, SortBy, SortDirection, SpaceQuota, SpaceQuotaBase, SpaceQuotaCreate, SpaceScope, UserQuota, UserQuotaBase, UserQuotaCreate, VoteApprove, VoteVeto, VoteWithdraw, WebhookAction, WorkflowQuota, WorkflowQuotaBase, WorkflowQuotaCreate, WorkflowTemplateQuota, WorkflowTemplateQuotaBase, WorkflowTemplateQuotaCreate, 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, validateListQuotasParams, 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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
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.40
|
|
513
513
|
*
|
|
514
514
|
*
|
|
515
515
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
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.45",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/src/index.cjs",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@redocly/cli": "2.28.1",
|
|
52
52
|
"@stoplight/spectral-cli": "6.15.0",
|
|
53
53
|
"@types/jest": "30.0.0",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "8.58.2",
|
|
55
55
|
"@typescript-eslint/parser": "8.58.2",
|
|
56
56
|
"eslint": "10.2.1",
|
|
57
57
|
"eslint-config-prettier": "10.1.8",
|