@approvio/api 0.0.43 → 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 +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-BDVRQ5B4.d.cts} +12 -12
- package/dist/{workflow-create-uX4n87mS.d.mts → workflow-create-q4n-UZWp.d.mts} +12 -12
- package/package.json +1 -1
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,59 +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
|
-
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
55
|
-
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
56
|
-
MaxTemplates: "MAX_TEMPLATES",
|
|
57
|
-
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
58
|
-
};
|
|
59
|
-
_GlobalQuota.ScopeEnum = { Global: "GLOBAL" };
|
|
60
|
-
})(GlobalQuota || (GlobalQuota = {}));
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region generated/openapi/model/global-quota-base.ts
|
|
63
|
-
let GlobalQuotaBase;
|
|
64
|
-
(function(_GlobalQuotaBase) {
|
|
65
|
-
_GlobalQuotaBase.ScopeEnum = { Global: "GLOBAL" };
|
|
66
|
-
_GlobalQuotaBase.QuotaTypeEnum = {
|
|
67
|
-
MaxGroups: "MAX_GROUPS",
|
|
68
|
-
MaxSpaces: "MAX_SPACES",
|
|
69
|
-
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
70
|
-
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
71
|
-
MaxTemplates: "MAX_TEMPLATES",
|
|
72
|
-
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
73
|
-
};
|
|
74
|
-
})(GlobalQuotaBase || (GlobalQuotaBase = {}));
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region generated/openapi/model/global-quota-create.ts
|
|
77
|
-
let GlobalQuotaCreate;
|
|
78
|
-
(function(_GlobalQuotaCreate) {
|
|
79
|
-
_GlobalQuotaCreate.QuotaTypeEnum = {
|
|
80
|
-
MaxGroups: "MAX_GROUPS",
|
|
81
|
-
MaxSpaces: "MAX_SPACES",
|
|
82
|
-
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
83
|
-
MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP",
|
|
84
|
-
MaxTemplates: "MAX_TEMPLATES",
|
|
85
|
-
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
86
|
-
};
|
|
87
|
-
_GlobalQuotaCreate.ScopeEnum = { Global: "GLOBAL" };
|
|
88
|
-
})(GlobalQuotaCreate || (GlobalQuotaCreate = {}));
|
|
89
|
-
//#endregion
|
|
90
48
|
//#region generated/openapi/model/group-quota.ts
|
|
91
49
|
let GroupQuota;
|
|
92
50
|
(function(_GroupQuota) {
|
|
93
51
|
_GroupQuota.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
94
|
-
_GroupQuota.ScopeEnum = { Group: "
|
|
52
|
+
_GroupQuota.ScopeEnum = { Group: "Group" };
|
|
95
53
|
})(GroupQuota || (GroupQuota = {}));
|
|
96
54
|
//#endregion
|
|
97
55
|
//#region generated/openapi/model/group-quota-base.ts
|
|
98
56
|
let GroupQuotaBase;
|
|
99
57
|
(function(_GroupQuotaBase) {
|
|
100
|
-
_GroupQuotaBase.ScopeEnum = { Group: "
|
|
58
|
+
_GroupQuotaBase.ScopeEnum = { Group: "Group" };
|
|
101
59
|
_GroupQuotaBase.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
102
60
|
})(GroupQuotaBase || (GroupQuotaBase = {}));
|
|
103
61
|
//#endregion
|
|
@@ -105,7 +63,7 @@ let GroupQuotaBase;
|
|
|
105
63
|
let GroupQuotaCreate;
|
|
106
64
|
(function(_GroupQuotaCreate) {
|
|
107
65
|
_GroupQuotaCreate.QuotaTypeEnum = { MaxEntitiesPerGroup: "MAX_ENTITIES_PER_GROUP" };
|
|
108
|
-
_GroupQuotaCreate.ScopeEnum = { Group: "
|
|
66
|
+
_GroupQuotaCreate.ScopeEnum = { Group: "Group" };
|
|
109
67
|
})(GroupQuotaCreate || (GroupQuotaCreate = {}));
|
|
110
68
|
//#endregion
|
|
111
69
|
//#region generated/openapi/model/group-requirement-rule.ts
|
|
@@ -146,6 +104,51 @@ let OrRule;
|
|
|
146
104
|
_OrRule.TypeEnum = { Or: "OR" };
|
|
147
105
|
})(OrRule || (OrRule = {}));
|
|
148
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
|
|
149
152
|
//#region generated/openapi/model/org-scope.ts
|
|
150
153
|
let OrgScope;
|
|
151
154
|
(function(_OrgScope) {
|
|
@@ -154,10 +157,12 @@ let OrgScope;
|
|
|
154
157
|
//#endregion
|
|
155
158
|
//#region generated/openapi/model/quota-scope.ts
|
|
156
159
|
const QuotaScope = {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
Org: "Org",
|
|
161
|
+
Group: "Group",
|
|
162
|
+
Space: "Space",
|
|
163
|
+
WorkflowTemplate: "WorkflowTemplate",
|
|
164
|
+
Workflow: "Workflow",
|
|
165
|
+
User: "User"
|
|
161
166
|
};
|
|
162
167
|
//#endregion
|
|
163
168
|
//#region generated/openapi/model/quota-type.ts
|
|
@@ -167,25 +172,26 @@ const QuotaType = {
|
|
|
167
172
|
MaxRolesPerUser: "MAX_ROLES_PER_USER",
|
|
168
173
|
MaxGroups: "MAX_GROUPS",
|
|
169
174
|
MaxSpaces: "MAX_SPACES",
|
|
170
|
-
|
|
175
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
176
|
+
MaxVotesPerWorkflow: "MAX_VOTES_PER_WORKFLOW"
|
|
171
177
|
};
|
|
172
178
|
//#endregion
|
|
173
179
|
//#region generated/openapi/model/space-quota.ts
|
|
174
180
|
let SpaceQuota;
|
|
175
181
|
(function(_SpaceQuota) {
|
|
176
182
|
_SpaceQuota.QuotaTypeEnum = {
|
|
177
|
-
|
|
183
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
178
184
|
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
179
185
|
};
|
|
180
|
-
_SpaceQuota.ScopeEnum = { Space: "
|
|
186
|
+
_SpaceQuota.ScopeEnum = { Space: "Space" };
|
|
181
187
|
})(SpaceQuota || (SpaceQuota = {}));
|
|
182
188
|
//#endregion
|
|
183
189
|
//#region generated/openapi/model/space-quota-base.ts
|
|
184
190
|
let SpaceQuotaBase;
|
|
185
191
|
(function(_SpaceQuotaBase) {
|
|
186
|
-
_SpaceQuotaBase.ScopeEnum = { Space: "
|
|
192
|
+
_SpaceQuotaBase.ScopeEnum = { Space: "Space" };
|
|
187
193
|
_SpaceQuotaBase.QuotaTypeEnum = {
|
|
188
|
-
|
|
194
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
189
195
|
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
190
196
|
};
|
|
191
197
|
})(SpaceQuotaBase || (SpaceQuotaBase = {}));
|
|
@@ -194,10 +200,10 @@ let SpaceQuotaBase;
|
|
|
194
200
|
let SpaceQuotaCreate;
|
|
195
201
|
(function(_SpaceQuotaCreate) {
|
|
196
202
|
_SpaceQuotaCreate.QuotaTypeEnum = {
|
|
197
|
-
|
|
203
|
+
MaxWorkflowTemplatesPerSpace: "MAX_WORKFLOW_TEMPLATES_PER_SPACE",
|
|
198
204
|
MaxConcurrentWorkflows: "MAX_CONCURRENT_WORKFLOWS"
|
|
199
205
|
};
|
|
200
|
-
_SpaceQuotaCreate.ScopeEnum = { Space: "
|
|
206
|
+
_SpaceQuotaCreate.ScopeEnum = { Space: "Space" };
|
|
201
207
|
})(SpaceQuotaCreate || (SpaceQuotaCreate = {}));
|
|
202
208
|
//#endregion
|
|
203
209
|
//#region generated/openapi/model/space-scope.ts
|
|
@@ -206,26 +212,26 @@ let SpaceScope;
|
|
|
206
212
|
_SpaceScope.TypeEnum = { Space: "space" };
|
|
207
213
|
})(SpaceScope || (SpaceScope = {}));
|
|
208
214
|
//#endregion
|
|
209
|
-
//#region generated/openapi/model/
|
|
210
|
-
let
|
|
211
|
-
(function(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
})(
|
|
215
|
+
//#region generated/openapi/model/user-quota.ts
|
|
216
|
+
let UserQuota;
|
|
217
|
+
(function(_UserQuota) {
|
|
218
|
+
_UserQuota.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
219
|
+
_UserQuota.ScopeEnum = { User: "User" };
|
|
220
|
+
})(UserQuota || (UserQuota = {}));
|
|
215
221
|
//#endregion
|
|
216
|
-
//#region generated/openapi/model/
|
|
217
|
-
let
|
|
218
|
-
(function(
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
})(
|
|
222
|
+
//#region generated/openapi/model/user-quota-base.ts
|
|
223
|
+
let UserQuotaBase;
|
|
224
|
+
(function(_UserQuotaBase) {
|
|
225
|
+
_UserQuotaBase.ScopeEnum = { User: "User" };
|
|
226
|
+
_UserQuotaBase.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
227
|
+
})(UserQuotaBase || (UserQuotaBase = {}));
|
|
222
228
|
//#endregion
|
|
223
|
-
//#region generated/openapi/model/
|
|
224
|
-
let
|
|
225
|
-
(function(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
})(
|
|
229
|
+
//#region generated/openapi/model/user-quota-create.ts
|
|
230
|
+
let UserQuotaCreate;
|
|
231
|
+
(function(_UserQuotaCreate) {
|
|
232
|
+
_UserQuotaCreate.QuotaTypeEnum = { MaxRolesPerUser: "MAX_ROLES_PER_USER" };
|
|
233
|
+
_UserQuotaCreate.ScopeEnum = { User: "User" };
|
|
234
|
+
})(UserQuotaCreate || (UserQuotaCreate = {}));
|
|
229
235
|
//#endregion
|
|
230
236
|
//#region generated/openapi/model/vote-approve.ts
|
|
231
237
|
let VoteApprove;
|
|
@@ -256,6 +262,48 @@ let WebhookAction;
|
|
|
256
262
|
};
|
|
257
263
|
})(WebhookAction || (WebhookAction = {}));
|
|
258
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
|
|
259
307
|
//#region generated/openapi/model/workflow-template-scope.ts
|
|
260
308
|
let WorkflowTemplateScope;
|
|
261
309
|
(function(_WorkflowTemplateScope) {
|
|
@@ -1698,6 +1746,14 @@ function isAPIError(object) {
|
|
|
1698
1746
|
}
|
|
1699
1747
|
//#endregion
|
|
1700
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
|
+
};
|
|
1701
1757
|
function validateQuotaCreate(object) {
|
|
1702
1758
|
if (typeof object !== "object" || object === null) return (0, fp_ts_Either.left)("malformed_object");
|
|
1703
1759
|
if (!hasOwnProperty(object, "limit")) return (0, fp_ts_Either.left)("missing_limit");
|
|
@@ -1708,52 +1764,20 @@ function validateQuotaCreate(object) {
|
|
|
1708
1764
|
if (!isNonEmptyString(object.quotaType)) return (0, fp_ts_Either.left)("invalid_quotaType");
|
|
1709
1765
|
const limit = object.limit;
|
|
1710
1766
|
const scopeStr = object.scope;
|
|
1711
|
-
|
|
1767
|
+
const quotaTypeStr = object.quotaType;
|
|
1712
1768
|
const scope = getStringAsEnum(scopeStr, QuotaScope);
|
|
1713
1769
|
if (!scope) return (0, fp_ts_Either.left)("invalid_scope");
|
|
1714
|
-
const quotaTypeStr = object.quotaType;
|
|
1715
|
-
if (typeof quotaTypeStr !== "string") return (0, fp_ts_Either.left)("invalid_quotaType");
|
|
1716
|
-
const quotaType = getStringAsEnum(quotaTypeStr, QuotaType);
|
|
1717
|
-
if (!quotaType) return (0, fp_ts_Either.left)("invalid_quotaType");
|
|
1718
|
-
if (scope === "GLOBAL") {
|
|
1719
|
-
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 (0, fp_ts_Either.left)("invalid_scope_quotaType_combination");
|
|
1720
|
-
if (hasOwnProperty(object, "targetId") && object.targetId !== void 0) return (0, fp_ts_Either.left)("invalid_scope_targetId_combination");
|
|
1721
|
-
return (0, fp_ts_Either.right)({
|
|
1722
|
-
limit,
|
|
1723
|
-
scope,
|
|
1724
|
-
quotaType
|
|
1725
|
-
});
|
|
1726
|
-
}
|
|
1727
1770
|
if (!hasOwnProperty(object, "targetId")) return (0, fp_ts_Either.left)("missing_targetId");
|
|
1728
1771
|
if (!isNonEmptyString(object.targetId) || !isUUIDv4(object.targetId)) return (0, fp_ts_Either.left)("invalid_targetId");
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
}
|
|
1738
|
-
if (scope === "TEMPLATE") {
|
|
1739
|
-
if (quotaType !== "MAX_CONCURRENT_WORKFLOWS") return (0, fp_ts_Either.left)("invalid_scope_quotaType_combination");
|
|
1740
|
-
return (0, fp_ts_Either.right)({
|
|
1741
|
-
limit,
|
|
1742
|
-
scope,
|
|
1743
|
-
quotaType,
|
|
1744
|
-
targetId: object.targetId
|
|
1745
|
-
});
|
|
1746
|
-
}
|
|
1747
|
-
if (scope === "SPACE") {
|
|
1748
|
-
if (quotaType !== "MAX_TEMPLATES" && quotaType !== "MAX_CONCURRENT_WORKFLOWS") return (0, fp_ts_Either.left)("invalid_scope_quotaType_combination");
|
|
1749
|
-
return (0, fp_ts_Either.right)({
|
|
1750
|
-
limit,
|
|
1751
|
-
scope,
|
|
1752
|
-
quotaType,
|
|
1753
|
-
targetId: object.targetId
|
|
1754
|
-
});
|
|
1755
|
-
}
|
|
1756
|
-
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
|
+
});
|
|
1757
1781
|
}
|
|
1758
1782
|
function validateQuotaUpdate(object) {
|
|
1759
1783
|
if (typeof object !== "object" || object === null) return (0, fp_ts_Either.left)("malformed_object");
|
|
@@ -1761,6 +1785,29 @@ function validateQuotaUpdate(object) {
|
|
|
1761
1785
|
if (!isNumber(object.limit) || !Number.isInteger(object.limit) || object.limit < 0) return (0, fp_ts_Either.left)("invalid_limit");
|
|
1762
1786
|
return (0, fp_ts_Either.right)({ limit: object.limit });
|
|
1763
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
|
+
}
|
|
1764
1811
|
//#endregion
|
|
1765
1812
|
Object.defineProperty(exports, "AgentTokenRequest", {
|
|
1766
1813
|
enumerable: true,
|
|
@@ -1780,24 +1827,6 @@ Object.defineProperty(exports, "EmailAction", {
|
|
|
1780
1827
|
return EmailAction;
|
|
1781
1828
|
}
|
|
1782
1829
|
});
|
|
1783
|
-
Object.defineProperty(exports, "GlobalQuota", {
|
|
1784
|
-
enumerable: true,
|
|
1785
|
-
get: function() {
|
|
1786
|
-
return GlobalQuota;
|
|
1787
|
-
}
|
|
1788
|
-
});
|
|
1789
|
-
Object.defineProperty(exports, "GlobalQuotaBase", {
|
|
1790
|
-
enumerable: true,
|
|
1791
|
-
get: function() {
|
|
1792
|
-
return GlobalQuotaBase;
|
|
1793
|
-
}
|
|
1794
|
-
});
|
|
1795
|
-
Object.defineProperty(exports, "GlobalQuotaCreate", {
|
|
1796
|
-
enumerable: true,
|
|
1797
|
-
get: function() {
|
|
1798
|
-
return GlobalQuotaCreate;
|
|
1799
|
-
}
|
|
1800
|
-
});
|
|
1801
1830
|
Object.defineProperty(exports, "GroupQuota", {
|
|
1802
1831
|
enumerable: true,
|
|
1803
1832
|
get: function() {
|
|
@@ -1846,6 +1875,24 @@ Object.defineProperty(exports, "OrRule", {
|
|
|
1846
1875
|
return OrRule;
|
|
1847
1876
|
}
|
|
1848
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
|
+
});
|
|
1849
1896
|
Object.defineProperty(exports, "OrgScope", {
|
|
1850
1897
|
enumerable: true,
|
|
1851
1898
|
get: function() {
|
|
@@ -1880,22 +1927,22 @@ Object.defineProperty(exports, "SpaceScope", {
|
|
|
1880
1927
|
return SpaceScope;
|
|
1881
1928
|
}
|
|
1882
1929
|
});
|
|
1883
|
-
Object.defineProperty(exports, "
|
|
1930
|
+
Object.defineProperty(exports, "UserQuota", {
|
|
1884
1931
|
enumerable: true,
|
|
1885
1932
|
get: function() {
|
|
1886
|
-
return
|
|
1933
|
+
return UserQuota;
|
|
1887
1934
|
}
|
|
1888
1935
|
});
|
|
1889
|
-
Object.defineProperty(exports, "
|
|
1936
|
+
Object.defineProperty(exports, "UserQuotaBase", {
|
|
1890
1937
|
enumerable: true,
|
|
1891
1938
|
get: function() {
|
|
1892
|
-
return
|
|
1939
|
+
return UserQuotaBase;
|
|
1893
1940
|
}
|
|
1894
1941
|
});
|
|
1895
|
-
Object.defineProperty(exports, "
|
|
1942
|
+
Object.defineProperty(exports, "UserQuotaCreate", {
|
|
1896
1943
|
enumerable: true,
|
|
1897
1944
|
get: function() {
|
|
1898
|
-
return
|
|
1945
|
+
return UserQuotaCreate;
|
|
1899
1946
|
}
|
|
1900
1947
|
});
|
|
1901
1948
|
Object.defineProperty(exports, "VoteApprove", {
|
|
@@ -1922,6 +1969,42 @@ Object.defineProperty(exports, "WebhookAction", {
|
|
|
1922
1969
|
return WebhookAction;
|
|
1923
1970
|
}
|
|
1924
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
|
+
});
|
|
1925
2008
|
Object.defineProperty(exports, "WorkflowTemplateScope", {
|
|
1926
2009
|
enumerable: true,
|
|
1927
2010
|
get: function() {
|
|
@@ -1956,6 +2039,7 @@ exports.validateListGroupEntities200Response = validateListGroupEntities200Respo
|
|
|
1956
2039
|
exports.validateListGroups200Response = validateListGroups200Response;
|
|
1957
2040
|
exports.validateListGroupsParams = validateListGroupsParams;
|
|
1958
2041
|
exports.validateListOrganizationAdminsForOrg200Response = validateListOrganizationAdminsForOrg200Response;
|
|
2042
|
+
exports.validateListQuotasParams = validateListQuotasParams;
|
|
1959
2043
|
exports.validateListRoleTemplates200Response = validateListRoleTemplates200Response;
|
|
1960
2044
|
exports.validateListSpaces200Response = validateListSpaces200Response;
|
|
1961
2045
|
exports.validateListSpacesParams = validateListSpacesParams;
|