@approvio/api 0.0.42 → 0.0.44
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 +212 -156
- package/dist/src/index.d.cts +428 -346
- package/dist/src/index.d.mts +428 -346
- package/dist/src/index.mjs +158 -121
- package/dist/{workflow-create-COE72Khd.d.cts → workflow-create-BDVRQ5B4.d.cts} +12 -12
- package/dist/{workflow-create-D4c1cIa_.d.mts → workflow-create-q4n-UZWp.d.mts} +12 -12
- package/package.json +6 -5
package/dist/mocks/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Workflow, d as UserSummary, f as ListGroups200Response, h as GroupInfo, i as ListWorkflows200Response, m as Group, n as User, p as Pagination, r as TokenResponse, t as WorkflowCreate } from "../workflow-create-
|
|
1
|
+
import { a as Workflow, d as UserSummary, f as ListGroups200Response, h as GroupInfo, i as ListWorkflows200Response, m as Group, n as User, p as Pagination, r as TokenResponse, t as WorkflowCreate } from "../workflow-create-BDVRQ5B4.cjs";
|
|
2
2
|
|
|
3
3
|
//#region mocks/user.fixtures.d.ts
|
|
4
4
|
declare const MOCK_USER_ID = "e6e08687-2189-4710-91b5-479cd25a9119";
|
package/dist/mocks/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Workflow, d as UserSummary, f as ListGroups200Response, h as GroupInfo, i as ListWorkflows200Response, m as Group, n as User, p as Pagination, r as TokenResponse, t as WorkflowCreate } from "../workflow-create-
|
|
1
|
+
import { a as Workflow, d as UserSummary, f as ListGroups200Response, h as GroupInfo, i as ListWorkflows200Response, m as Group, n as User, p as Pagination, r as TokenResponse, t as WorkflowCreate } from "../workflow-create-q4n-UZWp.mjs";
|
|
2
2
|
|
|
3
3
|
//#region mocks/user.fixtures.d.ts
|
|
4
4
|
declare const MOCK_USER_ID = "e6e08687-2189-4710-91b5-479cd25a9119";
|
package/dist/src/index.cjs
CHANGED
|
@@ -45,47 +45,17 @@ let EmailAction;
|
|
|
45
45
|
_EmailAction.TypeEnum = { Email: "EMAIL" };
|
|
46
46
|
})(EmailAction || (EmailAction = {}));
|
|
47
47
|
//#endregion
|
|
48
|
-
//#region generated/openapi/model/global-quota.ts
|
|
49
|
-
let GlobalQuota;
|
|
50
|
-
(function(_GlobalQuota) {
|
|
51
|
-
_GlobalQuota.QuotaTypeEnum = {
|
|
52
|
-
MaxGroups: "MAX_GROUPS",
|
|
53
|
-
MaxSpaces: "MAX_SPACES"
|
|
54
|
-
};
|
|
55
|
-
_GlobalQuota.ScopeEnum = { Global: "GLOBAL" };
|
|
56
|
-
})(GlobalQuota || (GlobalQuota = {}));
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region generated/openapi/model/global-quota-base.ts
|
|
59
|
-
let GlobalQuotaBase;
|
|
60
|
-
(function(_GlobalQuotaBase) {
|
|
61
|
-
_GlobalQuotaBase.ScopeEnum = { Global: "GLOBAL" };
|
|
62
|
-
_GlobalQuotaBase.QuotaTypeEnum = {
|
|
63
|
-
MaxGroups: "MAX_GROUPS",
|
|
64
|
-
MaxSpaces: "MAX_SPACES"
|
|
65
|
-
};
|
|
66
|
-
})(GlobalQuotaBase || (GlobalQuotaBase = {}));
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region generated/openapi/model/global-quota-create.ts
|
|
69
|
-
let GlobalQuotaCreate;
|
|
70
|
-
(function(_GlobalQuotaCreate) {
|
|
71
|
-
_GlobalQuotaCreate.QuotaTypeEnum = {
|
|
72
|
-
MaxGroups: "MAX_GROUPS",
|
|
73
|
-
MaxSpaces: "MAX_SPACES"
|
|
74
|
-
};
|
|
75
|
-
_GlobalQuotaCreate.ScopeEnum = { Global: "GLOBAL" };
|
|
76
|
-
})(GlobalQuotaCreate || (GlobalQuotaCreate = {}));
|
|
77
|
-
//#endregion
|
|
78
48
|
//#region generated/openapi/model/group-quota.ts
|
|
79
49
|
let GroupQuota;
|
|
80
50
|
(function(_GroupQuota) {
|
|
81
51
|
_GroupQuota.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
82
|
-
_GroupQuota.ScopeEnum = { Group: "
|
|
52
|
+
_GroupQuota.ScopeEnum = { Group: "Group" };
|
|
83
53
|
})(GroupQuota || (GroupQuota = {}));
|
|
84
54
|
//#endregion
|
|
85
55
|
//#region generated/openapi/model/group-quota-base.ts
|
|
86
56
|
let GroupQuotaBase;
|
|
87
57
|
(function(_GroupQuotaBase) {
|
|
88
|
-
_GroupQuotaBase.ScopeEnum = { Group: "
|
|
58
|
+
_GroupQuotaBase.ScopeEnum = { Group: "Group" };
|
|
89
59
|
_GroupQuotaBase.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
90
60
|
})(GroupQuotaBase || (GroupQuotaBase = {}));
|
|
91
61
|
//#endregion
|
|
@@ -93,7 +63,7 @@ let GroupQuotaBase;
|
|
|
93
63
|
let GroupQuotaCreate;
|
|
94
64
|
(function(_GroupQuotaCreate) {
|
|
95
65
|
_GroupQuotaCreate.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
96
|
-
_GroupQuotaCreate.ScopeEnum = { Group: "
|
|
66
|
+
_GroupQuotaCreate.ScopeEnum = { Group: "Group" };
|
|
97
67
|
})(GroupQuotaCreate || (GroupQuotaCreate = {}));
|
|
98
68
|
//#endregion
|
|
99
69
|
//#region generated/openapi/model/group-requirement-rule.ts
|
|
@@ -134,6 +104,51 @@ let OrRule;
|
|
|
134
104
|
_OrRule.TypeEnum = { Or: "OR" };
|
|
135
105
|
})(OrRule || (OrRule = {}));
|
|
136
106
|
//#endregion
|
|
107
|
+
//#region generated/openapi/model/org-quota.ts
|
|
108
|
+
let OrgQuota;
|
|
109
|
+
(function(_OrgQuota) {
|
|
110
|
+
_OrgQuota.QuotaTypeEnum = {
|
|
111
|
+
MaxGroups: "MAX_GROUPS",
|
|
112
|
+
MaxSpaces: "MAX_SPACES",
|
|
113
|
+
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
114
|
+
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
115
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
116
|
+
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS",
|
|
117
|
+
MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW"
|
|
118
|
+
};
|
|
119
|
+
_OrgQuota.ScopeEnum = { Org: "Org" };
|
|
120
|
+
})(OrgQuota || (OrgQuota = {}));
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region generated/openapi/model/org-quota-base.ts
|
|
123
|
+
let OrgQuotaBase;
|
|
124
|
+
(function(_OrgQuotaBase) {
|
|
125
|
+
_OrgQuotaBase.ScopeEnum = { Org: "Org" };
|
|
126
|
+
_OrgQuotaBase.QuotaTypeEnum = {
|
|
127
|
+
MaxGroups: "MAX_GROUPS",
|
|
128
|
+
MaxSpaces: "MAX_SPACES",
|
|
129
|
+
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
130
|
+
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
131
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
132
|
+
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS",
|
|
133
|
+
MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW"
|
|
134
|
+
};
|
|
135
|
+
})(OrgQuotaBase || (OrgQuotaBase = {}));
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region generated/openapi/model/org-quota-create.ts
|
|
138
|
+
let OrgQuotaCreate;
|
|
139
|
+
(function(_OrgQuotaCreate) {
|
|
140
|
+
_OrgQuotaCreate.QuotaTypeEnum = {
|
|
141
|
+
MaxGroups: "MAX_GROUPS",
|
|
142
|
+
MaxSpaces: "MAX_SPACES",
|
|
143
|
+
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
144
|
+
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
145
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
146
|
+
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS",
|
|
147
|
+
MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW"
|
|
148
|
+
};
|
|
149
|
+
_OrgQuotaCreate.ScopeEnum = { Org: "Org" };
|
|
150
|
+
})(OrgQuotaCreate || (OrgQuotaCreate = {}));
|
|
151
|
+
//#endregion
|
|
137
152
|
//#region generated/openapi/model/org-scope.ts
|
|
138
153
|
let OrgScope;
|
|
139
154
|
(function(_OrgScope) {
|
|
@@ -142,11 +157,12 @@ let OrgScope;
|
|
|
142
157
|
//#endregion
|
|
143
158
|
//#region generated/openapi/model/quota-scope.ts
|
|
144
159
|
const QuotaScope = {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
160
|
+
Org: "Org",
|
|
161
|
+
Group: "Group",
|
|
162
|
+
Space: "Space",
|
|
163
|
+
WorkflowTemplate: "WorkflowTemplate",
|
|
164
|
+
Workflow: "Workflow",
|
|
165
|
+
User: "User"
|
|
150
166
|
};
|
|
151
167
|
//#endregion
|
|
152
168
|
//#region generated/openapi/model/quota-type.ts
|
|
@@ -156,28 +172,38 @@ const QuotaType = {
|
|
|
156
172
|
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
157
173
|
MaxGroups: "MAX_GROUPS",
|
|
158
174
|
MaxSpaces: "MAX_SPACES",
|
|
159
|
-
|
|
175
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
176
|
+
MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW"
|
|
160
177
|
};
|
|
161
178
|
//#endregion
|
|
162
179
|
//#region generated/openapi/model/space-quota.ts
|
|
163
180
|
let SpaceQuota;
|
|
164
181
|
(function(_SpaceQuota) {
|
|
165
|
-
_SpaceQuota.QuotaTypeEnum = {
|
|
166
|
-
|
|
182
|
+
_SpaceQuota.QuotaTypeEnum = {
|
|
183
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
184
|
+
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
185
|
+
};
|
|
186
|
+
_SpaceQuota.ScopeEnum = { Space: "Space" };
|
|
167
187
|
})(SpaceQuota || (SpaceQuota = {}));
|
|
168
188
|
//#endregion
|
|
169
189
|
//#region generated/openapi/model/space-quota-base.ts
|
|
170
190
|
let SpaceQuotaBase;
|
|
171
191
|
(function(_SpaceQuotaBase) {
|
|
172
|
-
_SpaceQuotaBase.ScopeEnum = { Space: "
|
|
173
|
-
_SpaceQuotaBase.QuotaTypeEnum = {
|
|
192
|
+
_SpaceQuotaBase.ScopeEnum = { Space: "Space" };
|
|
193
|
+
_SpaceQuotaBase.QuotaTypeEnum = {
|
|
194
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
195
|
+
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
196
|
+
};
|
|
174
197
|
})(SpaceQuotaBase || (SpaceQuotaBase = {}));
|
|
175
198
|
//#endregion
|
|
176
199
|
//#region generated/openapi/model/space-quota-create.ts
|
|
177
200
|
let SpaceQuotaCreate;
|
|
178
201
|
(function(_SpaceQuotaCreate) {
|
|
179
|
-
_SpaceQuotaCreate.QuotaTypeEnum = {
|
|
180
|
-
|
|
202
|
+
_SpaceQuotaCreate.QuotaTypeEnum = {
|
|
203
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
204
|
+
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
205
|
+
};
|
|
206
|
+
_SpaceQuotaCreate.ScopeEnum = { Space: "Space" };
|
|
181
207
|
})(SpaceQuotaCreate || (SpaceQuotaCreate = {}));
|
|
182
208
|
//#endregion
|
|
183
209
|
//#region generated/openapi/model/space-scope.ts
|
|
@@ -186,38 +212,17 @@ let SpaceScope;
|
|
|
186
212
|
_SpaceScope.TypeEnum = { Space: "space" };
|
|
187
213
|
})(SpaceScope || (SpaceScope = {}));
|
|
188
214
|
//#endregion
|
|
189
|
-
//#region generated/openapi/model/template-quota.ts
|
|
190
|
-
let TemplateQuota;
|
|
191
|
-
(function(_TemplateQuota) {
|
|
192
|
-
_TemplateQuota.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
193
|
-
_TemplateQuota.ScopeEnum = { Template: "TEMPLATE" };
|
|
194
|
-
})(TemplateQuota || (TemplateQuota = {}));
|
|
195
|
-
//#endregion
|
|
196
|
-
//#region generated/openapi/model/template-quota-base.ts
|
|
197
|
-
let TemplateQuotaBase;
|
|
198
|
-
(function(_TemplateQuotaBase) {
|
|
199
|
-
_TemplateQuotaBase.ScopeEnum = { Template: "TEMPLATE" };
|
|
200
|
-
_TemplateQuotaBase.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
201
|
-
})(TemplateQuotaBase || (TemplateQuotaBase = {}));
|
|
202
|
-
//#endregion
|
|
203
|
-
//#region generated/openapi/model/template-quota-create.ts
|
|
204
|
-
let TemplateQuotaCreate;
|
|
205
|
-
(function(_TemplateQuotaCreate) {
|
|
206
|
-
_TemplateQuotaCreate.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
207
|
-
_TemplateQuotaCreate.ScopeEnum = { Template: "TEMPLATE" };
|
|
208
|
-
})(TemplateQuotaCreate || (TemplateQuotaCreate = {}));
|
|
209
|
-
//#endregion
|
|
210
215
|
//#region generated/openapi/model/user-quota.ts
|
|
211
216
|
let UserQuota;
|
|
212
217
|
(function(_UserQuota) {
|
|
213
218
|
_UserQuota.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
214
|
-
_UserQuota.ScopeEnum = { User: "
|
|
219
|
+
_UserQuota.ScopeEnum = { User: "User" };
|
|
215
220
|
})(UserQuota || (UserQuota = {}));
|
|
216
221
|
//#endregion
|
|
217
222
|
//#region generated/openapi/model/user-quota-base.ts
|
|
218
223
|
let UserQuotaBase;
|
|
219
224
|
(function(_UserQuotaBase) {
|
|
220
|
-
_UserQuotaBase.ScopeEnum = { User: "
|
|
225
|
+
_UserQuotaBase.ScopeEnum = { User: "User" };
|
|
221
226
|
_UserQuotaBase.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
222
227
|
})(UserQuotaBase || (UserQuotaBase = {}));
|
|
223
228
|
//#endregion
|
|
@@ -225,7 +230,7 @@ let UserQuotaBase;
|
|
|
225
230
|
let UserQuotaCreate;
|
|
226
231
|
(function(_UserQuotaCreate) {
|
|
227
232
|
_UserQuotaCreate.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
228
|
-
_UserQuotaCreate.ScopeEnum = { User: "
|
|
233
|
+
_UserQuotaCreate.ScopeEnum = { User: "User" };
|
|
229
234
|
})(UserQuotaCreate || (UserQuotaCreate = {}));
|
|
230
235
|
//#endregion
|
|
231
236
|
//#region generated/openapi/model/vote-approve.ts
|
|
@@ -257,6 +262,48 @@ let WebhookAction;
|
|
|
257
262
|
};
|
|
258
263
|
})(WebhookAction || (WebhookAction = {}));
|
|
259
264
|
//#endregion
|
|
265
|
+
//#region generated/openapi/model/workflow-quota.ts
|
|
266
|
+
let WorkflowQuota;
|
|
267
|
+
(function(_WorkflowQuota) {
|
|
268
|
+
_WorkflowQuota.QuotaTypeEnum = { MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW" };
|
|
269
|
+
_WorkflowQuota.ScopeEnum = { Workflow: "Workflow" };
|
|
270
|
+
})(WorkflowQuota || (WorkflowQuota = {}));
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region generated/openapi/model/workflow-quota-base.ts
|
|
273
|
+
let WorkflowQuotaBase;
|
|
274
|
+
(function(_WorkflowQuotaBase) {
|
|
275
|
+
_WorkflowQuotaBase.ScopeEnum = { Workflow: "Workflow" };
|
|
276
|
+
_WorkflowQuotaBase.QuotaTypeEnum = { MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW" };
|
|
277
|
+
})(WorkflowQuotaBase || (WorkflowQuotaBase = {}));
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region generated/openapi/model/workflow-quota-create.ts
|
|
280
|
+
let WorkflowQuotaCreate;
|
|
281
|
+
(function(_WorkflowQuotaCreate) {
|
|
282
|
+
_WorkflowQuotaCreate.QuotaTypeEnum = { MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW" };
|
|
283
|
+
_WorkflowQuotaCreate.ScopeEnum = { Workflow: "Workflow" };
|
|
284
|
+
})(WorkflowQuotaCreate || (WorkflowQuotaCreate = {}));
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region generated/openapi/model/workflow-template-quota.ts
|
|
287
|
+
let WorkflowTemplateQuota;
|
|
288
|
+
(function(_WorkflowTemplateQuota) {
|
|
289
|
+
_WorkflowTemplateQuota.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
290
|
+
_WorkflowTemplateQuota.ScopeEnum = { WorkflowTemplate: "WorkflowTemplate" };
|
|
291
|
+
})(WorkflowTemplateQuota || (WorkflowTemplateQuota = {}));
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region generated/openapi/model/workflow-template-quota-base.ts
|
|
294
|
+
let WorkflowTemplateQuotaBase;
|
|
295
|
+
(function(_WorkflowTemplateQuotaBase) {
|
|
296
|
+
_WorkflowTemplateQuotaBase.ScopeEnum = { WorkflowTemplate: "WorkflowTemplate" };
|
|
297
|
+
_WorkflowTemplateQuotaBase.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
298
|
+
})(WorkflowTemplateQuotaBase || (WorkflowTemplateQuotaBase = {}));
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region generated/openapi/model/workflow-template-quota-create.ts
|
|
301
|
+
let WorkflowTemplateQuotaCreate;
|
|
302
|
+
(function(_WorkflowTemplateQuotaCreate) {
|
|
303
|
+
_WorkflowTemplateQuotaCreate.QuotaTypeEnum = { MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS" };
|
|
304
|
+
_WorkflowTemplateQuotaCreate.ScopeEnum = { WorkflowTemplate: "WorkflowTemplate" };
|
|
305
|
+
})(WorkflowTemplateQuotaCreate || (WorkflowTemplateQuotaCreate = {}));
|
|
306
|
+
//#endregion
|
|
260
307
|
//#region generated/openapi/model/workflow-template-scope.ts
|
|
261
308
|
let WorkflowTemplateScope;
|
|
262
309
|
(function(_WorkflowTemplateScope) {
|
|
@@ -1699,6 +1746,14 @@ function isAPIError(object) {
|
|
|
1699
1746
|
}
|
|
1700
1747
|
//#endregion
|
|
1701
1748
|
//#region src/validators/quota.validator.ts
|
|
1749
|
+
const QUOTA_TYPE_ENUM_BY_SCOPE = {
|
|
1750
|
+
Org: OrgQuotaBase.QuotaTypeEnum,
|
|
1751
|
+
Group: GroupQuotaBase.QuotaTypeEnum,
|
|
1752
|
+
Space: SpaceQuotaBase.QuotaTypeEnum,
|
|
1753
|
+
WorkflowTemplate: WorkflowTemplateQuotaBase.QuotaTypeEnum,
|
|
1754
|
+
Workflow: WorkflowQuotaBase.QuotaTypeEnum,
|
|
1755
|
+
User: UserQuotaBase.QuotaTypeEnum
|
|
1756
|
+
};
|
|
1702
1757
|
function validateQuotaCreate(object) {
|
|
1703
1758
|
if (typeof object !== "object" || object === null) return (0, fp_ts_Either.left)("malformed_object");
|
|
1704
1759
|
if (!hasOwnProperty(object, "limit")) return (0, fp_ts_Either.left)("missing_limit");
|
|
@@ -1709,61 +1764,20 @@ function validateQuotaCreate(object) {
|
|
|
1709
1764
|
if (!isNonEmptyString(object.quotaType)) return (0, fp_ts_Either.left)("invalid_quotaType");
|
|
1710
1765
|
const limit = object.limit;
|
|
1711
1766
|
const scopeStr = object.scope;
|
|
1712
|
-
|
|
1767
|
+
const quotaTypeStr = object.quotaType;
|
|
1713
1768
|
const scope = getStringAsEnum(scopeStr, QuotaScope);
|
|
1714
1769
|
if (!scope) return (0, fp_ts_Either.left)("invalid_scope");
|
|
1715
|
-
const quotaTypeStr = object.quotaType;
|
|
1716
|
-
if (typeof quotaTypeStr !== "string") return (0, fp_ts_Either.left)("invalid_quotaType");
|
|
1717
|
-
const quotaType = getStringAsEnum(quotaTypeStr, QuotaType);
|
|
1718
|
-
if (!quotaType) return (0, fp_ts_Either.left)("invalid_quotaType");
|
|
1719
|
-
if (scope === "GLOBAL") {
|
|
1720
|
-
if (quotaType !== "MAX_GROUPS" && quotaType !== "MAX_SPACES") return (0, fp_ts_Either.left)("invalid_scope_quotaType_combination");
|
|
1721
|
-
if (hasOwnProperty(object, "targetId") && object.targetId !== void 0) return (0, fp_ts_Either.left)("invalid_scope_targetId_combination");
|
|
1722
|
-
return (0, fp_ts_Either.right)({
|
|
1723
|
-
limit,
|
|
1724
|
-
scope,
|
|
1725
|
-
quotaType
|
|
1726
|
-
});
|
|
1727
|
-
}
|
|
1728
1770
|
if (!hasOwnProperty(object, "targetId")) return (0, fp_ts_Either.left)("missing_targetId");
|
|
1729
1771
|
if (!isNonEmptyString(object.targetId) || !isUUIDv4(object.targetId)) return (0, fp_ts_Either.left)("invalid_targetId");
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
}
|
|
1739
|
-
if (scope === "TEMPLATE") {
|
|
1740
|
-
if (quotaType !== "MAX_CONCURRENT_WORKFLOWS") return (0, fp_ts_Either.left)("invalid_scope_quotaType_combination");
|
|
1741
|
-
return (0, fp_ts_Either.right)({
|
|
1742
|
-
limit,
|
|
1743
|
-
scope,
|
|
1744
|
-
quotaType,
|
|
1745
|
-
targetId: object.targetId
|
|
1746
|
-
});
|
|
1747
|
-
}
|
|
1748
|
-
if (scope === "USER") {
|
|
1749
|
-
if (quotaType !== "MAX_ROLES_PER_USER") return (0, fp_ts_Either.left)("invalid_scope_quotaType_combination");
|
|
1750
|
-
return (0, fp_ts_Either.right)({
|
|
1751
|
-
limit,
|
|
1752
|
-
scope,
|
|
1753
|
-
quotaType,
|
|
1754
|
-
targetId: object.targetId
|
|
1755
|
-
});
|
|
1756
|
-
}
|
|
1757
|
-
if (scope === "SPACE") {
|
|
1758
|
-
if (quotaType !== "MAX_TEMPLATES") return (0, fp_ts_Either.left)("invalid_scope_quotaType_combination");
|
|
1759
|
-
return (0, fp_ts_Either.right)({
|
|
1760
|
-
limit,
|
|
1761
|
-
scope,
|
|
1762
|
-
quotaType,
|
|
1763
|
-
targetId: object.targetId
|
|
1764
|
-
});
|
|
1765
|
-
}
|
|
1766
|
-
return (0, fp_ts_Either.left)("invalid_scope_quotaType_combination");
|
|
1772
|
+
const targetId = object.targetId;
|
|
1773
|
+
const quotaType = getStringAsEnum(quotaTypeStr, QUOTA_TYPE_ENUM_BY_SCOPE[scope]);
|
|
1774
|
+
if (quotaType === void 0) return (0, fp_ts_Either.left)("invalid_scope_quotaType_combination");
|
|
1775
|
+
return (0, fp_ts_Either.right)({
|
|
1776
|
+
limit,
|
|
1777
|
+
scope,
|
|
1778
|
+
quotaType,
|
|
1779
|
+
targetId
|
|
1780
|
+
});
|
|
1767
1781
|
}
|
|
1768
1782
|
function validateQuotaUpdate(object) {
|
|
1769
1783
|
if (typeof object !== "object" || object === null) return (0, fp_ts_Either.left)("malformed_object");
|
|
@@ -1771,6 +1785,29 @@ function validateQuotaUpdate(object) {
|
|
|
1771
1785
|
if (!isNumber(object.limit) || !Number.isInteger(object.limit) || object.limit < 0) return (0, fp_ts_Either.left)("invalid_limit");
|
|
1772
1786
|
return (0, fp_ts_Either.right)({ limit: object.limit });
|
|
1773
1787
|
}
|
|
1788
|
+
function validateListQuotasParams(object) {
|
|
1789
|
+
const eitherSharedParams = validateSharedListParams(object);
|
|
1790
|
+
if ((0, fp_ts_Either.isLeft)(eitherSharedParams)) return eitherSharedParams;
|
|
1791
|
+
if (typeof object !== "object" || object === null) return (0, fp_ts_Either.left)("malformed_object");
|
|
1792
|
+
const result = { ...eitherSharedParams.right };
|
|
1793
|
+
if (hasOwnProperty(object, "scope") && object.scope !== void 0) {
|
|
1794
|
+
if (!isNonEmptyString(object.scope)) return (0, fp_ts_Either.left)("invalid_scope");
|
|
1795
|
+
const scope = getStringAsEnum(object.scope, QuotaScope);
|
|
1796
|
+
if (!scope) return (0, fp_ts_Either.left)("invalid_scope");
|
|
1797
|
+
result.scope = scope;
|
|
1798
|
+
}
|
|
1799
|
+
if (hasOwnProperty(object, "targetId") && object.targetId !== void 0) {
|
|
1800
|
+
if (!isNonEmptyString(object.targetId) || !isUUIDv4(object.targetId)) return (0, fp_ts_Either.left)("invalid_targetId");
|
|
1801
|
+
result.targetId = object.targetId;
|
|
1802
|
+
}
|
|
1803
|
+
if (hasOwnProperty(object, "quotaType") && object.quotaType !== void 0) {
|
|
1804
|
+
if (!isNonEmptyString(object.quotaType)) return (0, fp_ts_Either.left)("invalid_quotaType");
|
|
1805
|
+
const quotaType = getStringAsEnum(object.quotaType, QuotaType);
|
|
1806
|
+
if (!quotaType) return (0, fp_ts_Either.left)("invalid_quotaType");
|
|
1807
|
+
result.quotaType = quotaType;
|
|
1808
|
+
}
|
|
1809
|
+
return (0, fp_ts_Either.right)(result);
|
|
1810
|
+
}
|
|
1774
1811
|
//#endregion
|
|
1775
1812
|
Object.defineProperty(exports, "AgentTokenRequest", {
|
|
1776
1813
|
enumerable: true,
|
|
@@ -1790,24 +1827,6 @@ Object.defineProperty(exports, "EmailAction", {
|
|
|
1790
1827
|
return EmailAction;
|
|
1791
1828
|
}
|
|
1792
1829
|
});
|
|
1793
|
-
Object.defineProperty(exports, "GlobalQuota", {
|
|
1794
|
-
enumerable: true,
|
|
1795
|
-
get: function() {
|
|
1796
|
-
return GlobalQuota;
|
|
1797
|
-
}
|
|
1798
|
-
});
|
|
1799
|
-
Object.defineProperty(exports, "GlobalQuotaBase", {
|
|
1800
|
-
enumerable: true,
|
|
1801
|
-
get: function() {
|
|
1802
|
-
return GlobalQuotaBase;
|
|
1803
|
-
}
|
|
1804
|
-
});
|
|
1805
|
-
Object.defineProperty(exports, "GlobalQuotaCreate", {
|
|
1806
|
-
enumerable: true,
|
|
1807
|
-
get: function() {
|
|
1808
|
-
return GlobalQuotaCreate;
|
|
1809
|
-
}
|
|
1810
|
-
});
|
|
1811
1830
|
Object.defineProperty(exports, "GroupQuota", {
|
|
1812
1831
|
enumerable: true,
|
|
1813
1832
|
get: function() {
|
|
@@ -1856,6 +1875,24 @@ Object.defineProperty(exports, "OrRule", {
|
|
|
1856
1875
|
return OrRule;
|
|
1857
1876
|
}
|
|
1858
1877
|
});
|
|
1878
|
+
Object.defineProperty(exports, "OrgQuota", {
|
|
1879
|
+
enumerable: true,
|
|
1880
|
+
get: function() {
|
|
1881
|
+
return OrgQuota;
|
|
1882
|
+
}
|
|
1883
|
+
});
|
|
1884
|
+
Object.defineProperty(exports, "OrgQuotaBase", {
|
|
1885
|
+
enumerable: true,
|
|
1886
|
+
get: function() {
|
|
1887
|
+
return OrgQuotaBase;
|
|
1888
|
+
}
|
|
1889
|
+
});
|
|
1890
|
+
Object.defineProperty(exports, "OrgQuotaCreate", {
|
|
1891
|
+
enumerable: true,
|
|
1892
|
+
get: function() {
|
|
1893
|
+
return OrgQuotaCreate;
|
|
1894
|
+
}
|
|
1895
|
+
});
|
|
1859
1896
|
Object.defineProperty(exports, "OrgScope", {
|
|
1860
1897
|
enumerable: true,
|
|
1861
1898
|
get: function() {
|
|
@@ -1890,24 +1927,6 @@ Object.defineProperty(exports, "SpaceScope", {
|
|
|
1890
1927
|
return SpaceScope;
|
|
1891
1928
|
}
|
|
1892
1929
|
});
|
|
1893
|
-
Object.defineProperty(exports, "TemplateQuota", {
|
|
1894
|
-
enumerable: true,
|
|
1895
|
-
get: function() {
|
|
1896
|
-
return TemplateQuota;
|
|
1897
|
-
}
|
|
1898
|
-
});
|
|
1899
|
-
Object.defineProperty(exports, "TemplateQuotaBase", {
|
|
1900
|
-
enumerable: true,
|
|
1901
|
-
get: function() {
|
|
1902
|
-
return TemplateQuotaBase;
|
|
1903
|
-
}
|
|
1904
|
-
});
|
|
1905
|
-
Object.defineProperty(exports, "TemplateQuotaCreate", {
|
|
1906
|
-
enumerable: true,
|
|
1907
|
-
get: function() {
|
|
1908
|
-
return TemplateQuotaCreate;
|
|
1909
|
-
}
|
|
1910
|
-
});
|
|
1911
1930
|
Object.defineProperty(exports, "UserQuota", {
|
|
1912
1931
|
enumerable: true,
|
|
1913
1932
|
get: function() {
|
|
@@ -1950,6 +1969,42 @@ Object.defineProperty(exports, "WebhookAction", {
|
|
|
1950
1969
|
return WebhookAction;
|
|
1951
1970
|
}
|
|
1952
1971
|
});
|
|
1972
|
+
Object.defineProperty(exports, "WorkflowQuota", {
|
|
1973
|
+
enumerable: true,
|
|
1974
|
+
get: function() {
|
|
1975
|
+
return WorkflowQuota;
|
|
1976
|
+
}
|
|
1977
|
+
});
|
|
1978
|
+
Object.defineProperty(exports, "WorkflowQuotaBase", {
|
|
1979
|
+
enumerable: true,
|
|
1980
|
+
get: function() {
|
|
1981
|
+
return WorkflowQuotaBase;
|
|
1982
|
+
}
|
|
1983
|
+
});
|
|
1984
|
+
Object.defineProperty(exports, "WorkflowQuotaCreate", {
|
|
1985
|
+
enumerable: true,
|
|
1986
|
+
get: function() {
|
|
1987
|
+
return WorkflowQuotaCreate;
|
|
1988
|
+
}
|
|
1989
|
+
});
|
|
1990
|
+
Object.defineProperty(exports, "WorkflowTemplateQuota", {
|
|
1991
|
+
enumerable: true,
|
|
1992
|
+
get: function() {
|
|
1993
|
+
return WorkflowTemplateQuota;
|
|
1994
|
+
}
|
|
1995
|
+
});
|
|
1996
|
+
Object.defineProperty(exports, "WorkflowTemplateQuotaBase", {
|
|
1997
|
+
enumerable: true,
|
|
1998
|
+
get: function() {
|
|
1999
|
+
return WorkflowTemplateQuotaBase;
|
|
2000
|
+
}
|
|
2001
|
+
});
|
|
2002
|
+
Object.defineProperty(exports, "WorkflowTemplateQuotaCreate", {
|
|
2003
|
+
enumerable: true,
|
|
2004
|
+
get: function() {
|
|
2005
|
+
return WorkflowTemplateQuotaCreate;
|
|
2006
|
+
}
|
|
2007
|
+
});
|
|
1953
2008
|
Object.defineProperty(exports, "WorkflowTemplateScope", {
|
|
1954
2009
|
enumerable: true,
|
|
1955
2010
|
get: function() {
|
|
@@ -1984,6 +2039,7 @@ exports.validateListGroupEntities200Response = validateListGroupEntities200Respo
|
|
|
1984
2039
|
exports.validateListGroups200Response = validateListGroups200Response;
|
|
1985
2040
|
exports.validateListGroupsParams = validateListGroupsParams;
|
|
1986
2041
|
exports.validateListOrganizationAdminsForOrg200Response = validateListOrganizationAdminsForOrg200Response;
|
|
2042
|
+
exports.validateListQuotasParams = validateListQuotasParams;
|
|
1987
2043
|
exports.validateListRoleTemplates200Response = validateListRoleTemplates200Response;
|
|
1988
2044
|
exports.validateListSpaces200Response = validateListSpaces200Response;
|
|
1989
2045
|
exports.validateListSpacesParams = validateListSpacesParams;
|