@approvio/api 0.0.38 → 0.0.40
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 +100 -26
- package/dist/src/index.d.cts +72 -73
- package/dist/src/index.d.mts +72 -73
- package/dist/src/index.mjs +97 -21
- package/dist/{workflow-create-CUw6ayXE.d.cts → workflow-create-DL0bZ2df.d.mts} +56 -24
- package/dist/{workflow-create-Du4B7X9Z.d.mts → workflow-create-Ng_I-FfX.d.cts} +56 -24
- package/package.json +2 -2
package/dist/src/index.mjs
CHANGED
|
@@ -5,8 +5,8 @@ import * as A from "fp-ts/Array";
|
|
|
5
5
|
//#region generated/openapi/model/agent-token-request.ts
|
|
6
6
|
let AgentTokenRequest;
|
|
7
7
|
(function(_AgentTokenRequest) {
|
|
8
|
-
_AgentTokenRequest.GrantTypeEnum = {
|
|
9
|
-
_AgentTokenRequest.ClientAssertionTypeEnum = {
|
|
8
|
+
_AgentTokenRequest.GrantTypeEnum = { UrnIetfParamsOauthGrantTypeJwtBearer: "urn:ietf:params:oauth:grant-type:jwt-bearer" };
|
|
9
|
+
_AgentTokenRequest.ClientAssertionTypeEnum = { UrnIetfParamsOauthClientAssertionTypeJwtBearer: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" };
|
|
10
10
|
})(AgentTokenRequest || (AgentTokenRequest = {}));
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region generated/openapi/model/and-rule.ts
|
|
@@ -80,22 +80,19 @@ let WebhookAction;
|
|
|
80
80
|
};
|
|
81
81
|
})(WebhookAction || (WebhookAction = {}));
|
|
82
82
|
//#endregion
|
|
83
|
-
//#region generated/openapi/model/workflow-template.ts
|
|
84
|
-
let WorkflowTemplate;
|
|
85
|
-
(function(_WorkflowTemplate) {
|
|
86
|
-
_WorkflowTemplate.StatusEnum = {
|
|
87
|
-
Active: "ACTIVE",
|
|
88
|
-
PendingDeprecation: "PENDING_DEPRECATION",
|
|
89
|
-
Deprecated: "DEPRECATED"
|
|
90
|
-
};
|
|
91
|
-
})(WorkflowTemplate || (WorkflowTemplate = {}));
|
|
92
|
-
//#endregion
|
|
93
83
|
//#region generated/openapi/model/workflow-template-scope.ts
|
|
94
84
|
let WorkflowTemplateScope;
|
|
95
85
|
(function(_WorkflowTemplateScope) {
|
|
96
86
|
_WorkflowTemplateScope.TypeEnum = { WorkflowTemplate: "workflow_template" };
|
|
97
87
|
})(WorkflowTemplateScope || (WorkflowTemplateScope = {}));
|
|
98
88
|
//#endregion
|
|
89
|
+
//#region generated/openapi/model/workflow-template-status.ts
|
|
90
|
+
const WorkflowTemplateStatus = {
|
|
91
|
+
Active: "ACTIVE",
|
|
92
|
+
PendingDeprecation: "PENDING_DEPRECATION",
|
|
93
|
+
Deprecated: "DEPRECATED"
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
99
96
|
//#region src/utils/validation.utils.ts
|
|
100
97
|
function hasOwnProperty(obj, prop) {
|
|
101
98
|
return Object.hasOwn(obj, prop);
|
|
@@ -109,6 +106,15 @@ function isNumber(value) {
|
|
|
109
106
|
function isArray(value) {
|
|
110
107
|
return Array.isArray(value);
|
|
111
108
|
}
|
|
109
|
+
function isStringBigInt(value) {
|
|
110
|
+
if (typeof value !== "string") return false;
|
|
111
|
+
try {
|
|
112
|
+
BigInt(value);
|
|
113
|
+
} catch {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
112
118
|
//#endregion
|
|
113
119
|
//#region src/validators/auth.validators.ts
|
|
114
120
|
function validateTokenResponse(object) {
|
|
@@ -534,7 +540,7 @@ function validateWorkflowTemplate(object) {
|
|
|
534
540
|
if (!hasOwnProperty(object, "name") || !isNonEmptyString(object.name)) return left("invalid_name");
|
|
535
541
|
if (!hasOwnProperty(object, "version") || !isNonEmptyString(object.version)) return left("invalid_version");
|
|
536
542
|
if (!hasOwnProperty(object, "status") || typeof object.status !== "string") return left("invalid_status");
|
|
537
|
-
const status = getStringAsEnum(object.status,
|
|
543
|
+
const status = getStringAsEnum(object.status, WorkflowTemplateStatus);
|
|
538
544
|
if (!status) return left("invalid_status");
|
|
539
545
|
if (!hasOwnProperty(object, "allowVotingOnDeprecatedTemplate") || typeof object.allowVotingOnDeprecatedTemplate !== "boolean") return left("invalid_allow_voting");
|
|
540
546
|
if (!hasOwnProperty(object, "approvalRule")) return left("missing_approval_rule");
|
|
@@ -543,6 +549,9 @@ function validateWorkflowTemplate(object) {
|
|
|
543
549
|
if (!hasOwnProperty(object, "spaceId") || !isNonEmptyString(object.spaceId)) return left("invalid_space_id");
|
|
544
550
|
if (!hasOwnProperty(object, "createdAt") || !isNonEmptyString(object.createdAt)) return left("invalid_created_at");
|
|
545
551
|
if (!hasOwnProperty(object, "updatedAt") || !isNonEmptyString(object.updatedAt)) return left("invalid_updated_at");
|
|
552
|
+
if (!hasOwnProperty(object, "concurrencyControl")) return left("invalid_concurrency_control");
|
|
553
|
+
const concurrencyControlValidation = validateConcurrencyControl(object.concurrencyControl);
|
|
554
|
+
if (isLeft(concurrencyControlValidation)) return left("invalid_concurrency_control");
|
|
546
555
|
const result = {
|
|
547
556
|
id: object.id,
|
|
548
557
|
name: object.name,
|
|
@@ -552,7 +561,8 @@ function validateWorkflowTemplate(object) {
|
|
|
552
561
|
approvalRule: approvalRuleValidation.right,
|
|
553
562
|
spaceId: object.spaceId,
|
|
554
563
|
createdAt: object.createdAt,
|
|
555
|
-
updatedAt: object.updatedAt
|
|
564
|
+
updatedAt: object.updatedAt,
|
|
565
|
+
concurrencyControl: concurrencyControlValidation.right
|
|
556
566
|
};
|
|
557
567
|
if (hasOwnProperty(object, "description") && object.description !== void 0) {
|
|
558
568
|
if (typeof object.description !== "string") return left("invalid_description");
|
|
@@ -618,7 +628,10 @@ function validateWorkflowTemplateCreate(object) {
|
|
|
618
628
|
}
|
|
619
629
|
function validateWorkflowTemplateUpdate(object) {
|
|
620
630
|
if (typeof object !== "object" || object === null) return left("malformed_object");
|
|
621
|
-
|
|
631
|
+
if (!hasOwnProperty(object, "concurrencyControl")) return left("invalid_concurrency_control");
|
|
632
|
+
const concurrencyControlValidation = validateConcurrencyControl(object.concurrencyControl);
|
|
633
|
+
if (isLeft(concurrencyControlValidation)) return left("invalid_concurrency_control");
|
|
634
|
+
const result = { concurrencyControl: concurrencyControlValidation.right };
|
|
622
635
|
if (hasOwnProperty(object, "description") && object.description !== void 0) {
|
|
623
636
|
if (typeof object.description !== "string") return left("invalid_description");
|
|
624
637
|
result.description = object.description;
|
|
@@ -678,10 +691,14 @@ function validateWorkflowTemplateSummary(object) {
|
|
|
678
691
|
if (!hasOwnProperty(object, "version") || !isNonEmptyString(object.version)) return left("invalid_version");
|
|
679
692
|
if (!hasOwnProperty(object, "createdAt") || !isNonEmptyString(object.createdAt)) return left("invalid_created_at");
|
|
680
693
|
if (!hasOwnProperty(object, "updatedAt") || !isNonEmptyString(object.updatedAt)) return left("invalid_updated_at");
|
|
694
|
+
if (!hasOwnProperty(object, "status") || typeof object.status !== "string") return left("invalid_status");
|
|
695
|
+
const status = getStringAsEnum(object.status, WorkflowTemplateStatus);
|
|
696
|
+
if (!status) return left("invalid_status");
|
|
681
697
|
const result = {
|
|
682
698
|
id: object.id,
|
|
683
699
|
name: object.name,
|
|
684
700
|
version: object.version,
|
|
701
|
+
status,
|
|
685
702
|
createdAt: object.createdAt,
|
|
686
703
|
updatedAt: object.updatedAt
|
|
687
704
|
};
|
|
@@ -708,6 +725,17 @@ function validateListWorkflowTemplates200Response(object) {
|
|
|
708
725
|
pagination: paginationValidation.right
|
|
709
726
|
});
|
|
710
727
|
}
|
|
728
|
+
let SortBy = /* @__PURE__ */ function(SortBy) {
|
|
729
|
+
SortBy["VERSION"] = "VERSION";
|
|
730
|
+
SortBy["UPDATED_AT"] = "UPDATED_AT";
|
|
731
|
+
SortBy["CREATED_AT"] = "CREATED_AT";
|
|
732
|
+
return SortBy;
|
|
733
|
+
}({});
|
|
734
|
+
let SortDirection = /* @__PURE__ */ function(SortDirection) {
|
|
735
|
+
SortDirection["ASC"] = "ASC";
|
|
736
|
+
SortDirection["DESC"] = "DESC";
|
|
737
|
+
return SortDirection;
|
|
738
|
+
}({});
|
|
711
739
|
function validateListWorkflowTemplatesParams(object) {
|
|
712
740
|
const sharedValidation = validateSharedListParams(object);
|
|
713
741
|
if (isLeft(sharedValidation)) return left(sharedValidation.left);
|
|
@@ -726,18 +754,66 @@ function validateListWorkflowTemplatesParams(object) {
|
|
|
726
754
|
if (!isNonEmptyString(object.spaceIdentifier)) return left("invalid_space_identifier");
|
|
727
755
|
result.spaceIdentifier = object.spaceIdentifier;
|
|
728
756
|
}
|
|
729
|
-
let status = [
|
|
757
|
+
let status = [WorkflowTemplateStatus.Active];
|
|
730
758
|
if (hasOwnProperty(object, "status") && object.status !== void 0) {
|
|
731
759
|
const statusVal = object.status;
|
|
760
|
+
const validatedStatuses = [];
|
|
732
761
|
if (Array.isArray(statusVal)) {
|
|
733
|
-
for (const item of statusVal)
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
762
|
+
for (const item of statusVal) {
|
|
763
|
+
if (typeof item !== "string") return left("invalid_status");
|
|
764
|
+
const validatedStatus = getStringAsEnum(item, WorkflowTemplateStatus);
|
|
765
|
+
if (!validatedStatus) return left("invalid_status");
|
|
766
|
+
validatedStatuses.push(validatedStatus);
|
|
767
|
+
}
|
|
768
|
+
status = validatedStatuses;
|
|
769
|
+
} else if (typeof statusVal === "string") {
|
|
770
|
+
const validatedStatus = getStringAsEnum(statusVal, WorkflowTemplateStatus);
|
|
771
|
+
if (!validatedStatus) return left("invalid_status");
|
|
772
|
+
status = [validatedStatus];
|
|
773
|
+
} else return left("invalid_status");
|
|
737
774
|
}
|
|
738
775
|
result.status = status;
|
|
776
|
+
if (hasOwnProperty(object, "sortBy") && object.sortBy !== void 0) {
|
|
777
|
+
const sortByVal = object.sortBy;
|
|
778
|
+
const values = [];
|
|
779
|
+
if (Array.isArray(sortByVal)) for (const unsafeSortBy of sortByVal) {
|
|
780
|
+
if (typeof unsafeSortBy !== "string") return left("invalid_sort_by");
|
|
781
|
+
const sortBy = getStringAsEnum(unsafeSortBy, SortBy);
|
|
782
|
+
if (sortBy === void 0) return left("invalid_sort_by");
|
|
783
|
+
values.push(sortBy);
|
|
784
|
+
}
|
|
785
|
+
else if (typeof sortByVal === "string") {
|
|
786
|
+
const sortBy = getStringAsEnum(sortByVal, SortBy);
|
|
787
|
+
if (sortBy === void 0) return left("invalid_sort_by");
|
|
788
|
+
values.push(sortBy);
|
|
789
|
+
} else return left("invalid_sort_by");
|
|
790
|
+
result.sortBy = values;
|
|
791
|
+
}
|
|
792
|
+
if (hasOwnProperty(object, "sortDirection") && object.sortDirection !== void 0) {
|
|
793
|
+
const sortDirectionVal = object.sortDirection;
|
|
794
|
+
const values = [];
|
|
795
|
+
if (Array.isArray(sortDirectionVal)) for (const item of sortDirectionVal) {
|
|
796
|
+
if (typeof item !== "string") return left("invalid_sort_direction");
|
|
797
|
+
const sortDirection = getStringAsEnum(item, SortDirection);
|
|
798
|
+
if (sortDirection === void 0) return left("invalid_sort_direction");
|
|
799
|
+
values.push(sortDirection);
|
|
800
|
+
}
|
|
801
|
+
else if (typeof sortDirectionVal === "string") {
|
|
802
|
+
const sortDirection = getStringAsEnum(sortDirectionVal, SortDirection);
|
|
803
|
+
if (sortDirection === void 0) return left("invalid_sort_direction");
|
|
804
|
+
values.push(sortDirection);
|
|
805
|
+
} else return left("invalid_sort_direction");
|
|
806
|
+
if (result.sortBy === void 0 || result.sortBy.length === 0) return left("sort_direction_without_sort_by");
|
|
807
|
+
if (values.length > result.sortBy.length) return left("sort_direction_length_mismatch");
|
|
808
|
+
result.sortDirection = values;
|
|
809
|
+
}
|
|
739
810
|
return right(result);
|
|
740
811
|
}
|
|
812
|
+
function validateConcurrencyControl(object) {
|
|
813
|
+
if (typeof object !== "object" || object === null) return left("invalid_concurrency_control");
|
|
814
|
+
if (!hasOwnProperty(object, "version") || !isStringBigInt(object.version)) return left("invalid_concurrency_control");
|
|
815
|
+
return right({ version: object.version });
|
|
816
|
+
}
|
|
741
817
|
//#endregion
|
|
742
818
|
//#region src/validators/workflow.validators.ts
|
|
743
819
|
function validateWorkflowCreate(object) {
|
|
@@ -1385,4 +1461,4 @@ function isAPIError(object) {
|
|
|
1385
1461
|
return E.isRight(validateAPIError(object));
|
|
1386
1462
|
}
|
|
1387
1463
|
//#endregion
|
|
1388
|
-
export { AgentTokenRequest, AndRule, EmailAction, GroupRequirementRule, GroupScope, OrRule, OrgScope, SpaceScope, VoteApprove, VoteVeto, VoteWithdraw, WebhookAction,
|
|
1464
|
+
export { AgentTokenRequest, AndRule, EmailAction, GroupRequirementRule, GroupScope, OrRule, OrgScope, SortBy, SortDirection, SpaceScope, VoteApprove, VoteVeto, VoteWithdraw, WebhookAction, WorkflowTemplateScope, WorkflowTemplateStatus, isAPIError, validateAPIError, validateAddGroupEntitiesRequest, validateAgentChallengeRequest, validateAgentChallengeResponse, validateAgentGet200Response, validateAgentRegistrationRequest, validateAgentRegistrationResponse, validateAgentTokenRequest, validateAgentTokenResponse, validateCanVoteResponse, validateConcurrencyControl, validateGetEntityInfo200Response, validateGetWorkflowParams, validateGetWorkflowVotes200Response, validateGroupCreate, validateGroupInfo, validateGroupScope, validateHealthResponse, validateInitiateCliLogin200Response, validateInitiateCliLoginRequest, validateListAgents200Response, validateListAgentsParams, validateListGroupEntities200Response, validateListGroups200Response, validateListGroupsParams, validateListOrganizationAdminsForOrg200Response, validateListRoleTemplates200Response, validateListSpaces200Response, validateListSpacesParams, validateListUsers200Response, validateListUsersParams, validateListWorkflowTemplates200Response, validateListWorkflowTemplatesParams, validateListWorkflows200Response, validateListWorkflowsParams, validateOidcCallbackRequest, validateOrganizationAdminCreate, validateOrganizationAdminRemove, validatePagination, validatePrivilegedTokenExchangeRequest, validatePrivilegedTokenResponse, validateRefreshTokenRequest, validateRemoveGroupEntitiesRequest, validateRoleAssignmentRequest, validateRoleRemovalRequest, validateSharedListParams, validateSpaceCreate, validateSpaceScope, validateTokenRequest, validateTokenResponse, validateUser, validateUserCreate, validateWorkflowCreate, validateWorkflowTemplate, validateWorkflowTemplateCreate, validateWorkflowTemplateDeprecate, validateWorkflowTemplateScope, validateWorkflowTemplateUpdate, validateWorkflowVoteRequest };
|
|
@@ -24,7 +24,7 @@ declare namespace OrRule {
|
|
|
24
24
|
* Workflow Approval System API
|
|
25
25
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
26
26
|
*
|
|
27
|
-
* The version of the OpenAPI document: 0.0.
|
|
27
|
+
* The version of the OpenAPI document: 0.0.35
|
|
28
28
|
*
|
|
29
29
|
*
|
|
30
30
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -91,12 +91,31 @@ declare namespace AndRule {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
|
+
//#region generated/openapi/model/concurrency-control.d.ts
|
|
95
|
+
/**
|
|
96
|
+
* Workflow Approval System API
|
|
97
|
+
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
98
|
+
*
|
|
99
|
+
* The version of the OpenAPI document: 0.0.35
|
|
100
|
+
*
|
|
101
|
+
*
|
|
102
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
103
|
+
* https://openapi-generator.tech
|
|
104
|
+
* Do not edit the class manually.
|
|
105
|
+
*/
|
|
106
|
+
interface ConcurrencyControl {
|
|
107
|
+
/**
|
|
108
|
+
* Optimistic concurrency control version to prevent race conditions and detect updates from other users.
|
|
109
|
+
*/
|
|
110
|
+
version: string;
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
94
113
|
//#region generated/openapi/model/email-action.d.ts
|
|
95
114
|
/**
|
|
96
115
|
* Workflow Approval System API
|
|
97
116
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
98
117
|
*
|
|
99
|
-
* The version of the OpenAPI document: 0.0.
|
|
118
|
+
* The version of the OpenAPI document: 0.0.35
|
|
100
119
|
*
|
|
101
120
|
*
|
|
102
121
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -128,7 +147,7 @@ declare namespace EmailAction {
|
|
|
128
147
|
* Workflow Approval System API
|
|
129
148
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
130
149
|
*
|
|
131
|
-
* The version of the OpenAPI document: 0.0.
|
|
150
|
+
* The version of the OpenAPI document: 0.0.35
|
|
132
151
|
*
|
|
133
152
|
*
|
|
134
153
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -145,7 +164,7 @@ interface GroupInfo {
|
|
|
145
164
|
* Workflow Approval System API
|
|
146
165
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
147
166
|
*
|
|
148
|
-
* The version of the OpenAPI document: 0.0.
|
|
167
|
+
* The version of the OpenAPI document: 0.0.35
|
|
149
168
|
*
|
|
150
169
|
*
|
|
151
170
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -184,7 +203,7 @@ interface Group {
|
|
|
184
203
|
* Workflow Approval System API
|
|
185
204
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
186
205
|
*
|
|
187
|
-
* The version of the OpenAPI document: 0.0.
|
|
206
|
+
* The version of the OpenAPI document: 0.0.35
|
|
188
207
|
*
|
|
189
208
|
*
|
|
190
209
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -217,7 +236,7 @@ interface ListGroups200Response {
|
|
|
217
236
|
* Workflow Approval System API
|
|
218
237
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
219
238
|
*
|
|
220
|
-
* The version of the OpenAPI document: 0.0.
|
|
239
|
+
* The version of the OpenAPI document: 0.0.35
|
|
221
240
|
*
|
|
222
241
|
*
|
|
223
242
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -239,12 +258,34 @@ interface UserSummary {
|
|
|
239
258
|
email: string;
|
|
240
259
|
}
|
|
241
260
|
//#endregion
|
|
261
|
+
//#region generated/openapi/model/workflow-template-status.d.ts
|
|
262
|
+
/**
|
|
263
|
+
* Workflow Approval System API
|
|
264
|
+
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
265
|
+
*
|
|
266
|
+
* The version of the OpenAPI document: 0.0.35
|
|
267
|
+
*
|
|
268
|
+
*
|
|
269
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
270
|
+
* https://openapi-generator.tech
|
|
271
|
+
* Do not edit the class manually.
|
|
272
|
+
*/
|
|
273
|
+
/**
|
|
274
|
+
* Lifecycle status of the template: * ACTIVE - Template can be referenced to create new workflows * PENDING_DEPRECATION - Template has been deprecated but there are still active workflows (intermediate status for async deprecation) * DEPRECATED - Template cannot be referenced for new workflows, voting may still be allowed based on settings
|
|
275
|
+
*/
|
|
276
|
+
type WorkflowTemplateStatus = 'ACTIVE' | 'PENDING_DEPRECATION' | 'DEPRECATED';
|
|
277
|
+
declare const WorkflowTemplateStatus: {
|
|
278
|
+
Active: WorkflowTemplateStatus;
|
|
279
|
+
PendingDeprecation: WorkflowTemplateStatus;
|
|
280
|
+
Deprecated: WorkflowTemplateStatus;
|
|
281
|
+
};
|
|
282
|
+
//#endregion
|
|
242
283
|
//#region generated/openapi/model/webhook-action.d.ts
|
|
243
284
|
/**
|
|
244
285
|
* Workflow Approval System API
|
|
245
286
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
246
287
|
*
|
|
247
|
-
* The version of the OpenAPI document: 0.0.
|
|
288
|
+
* The version of the OpenAPI document: 0.0.35
|
|
248
289
|
*
|
|
249
290
|
*
|
|
250
291
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -270,7 +311,7 @@ interface WebhookAction {
|
|
|
270
311
|
/**
|
|
271
312
|
* Optional headers to send with the request
|
|
272
313
|
*/
|
|
273
|
-
headers?: {
|
|
314
|
+
'headers'?: {
|
|
274
315
|
[key: string]: string;
|
|
275
316
|
};
|
|
276
317
|
}
|
|
@@ -316,10 +357,7 @@ interface WorkflowTemplate {
|
|
|
316
357
|
* Detailed description of the workflow template
|
|
317
358
|
*/
|
|
318
359
|
description?: string;
|
|
319
|
-
|
|
320
|
-
* Lifecycle status of the template: * ACTIVE - Template can be referenced to create new workflows * PENDING_DEPRECATION - Template has been deprecated but there are still active workflows (intermediate status for async deprecation) * DEPRECATED - Template cannot be referenced for new workflows, voting may still be allowed based on settings
|
|
321
|
-
*/
|
|
322
|
-
status: WorkflowTemplate.StatusEnum;
|
|
360
|
+
status: WorkflowTemplateStatus;
|
|
323
361
|
/**
|
|
324
362
|
* Whether voting is allowed on workflows using this template when it\'s deprecated
|
|
325
363
|
*/
|
|
@@ -349,15 +387,9 @@ interface WorkflowTemplate {
|
|
|
349
387
|
* Last update timestamp
|
|
350
388
|
*/
|
|
351
389
|
updatedAt: string;
|
|
390
|
+
concurrencyControl: ConcurrencyControl;
|
|
352
391
|
}
|
|
353
|
-
declare namespace WorkflowTemplate {
|
|
354
|
-
type StatusEnum = 'ACTIVE' | 'PENDING_DEPRECATION' | 'DEPRECATED';
|
|
355
|
-
const StatusEnum: {
|
|
356
|
-
Active: StatusEnum;
|
|
357
|
-
PendingDeprecation: StatusEnum;
|
|
358
|
-
Deprecated: StatusEnum;
|
|
359
|
-
};
|
|
360
|
-
}
|
|
392
|
+
declare namespace WorkflowTemplate {}
|
|
361
393
|
//#endregion
|
|
362
394
|
//#region generated/openapi/model/workflow-ref.d.ts
|
|
363
395
|
/**
|
|
@@ -419,7 +451,7 @@ interface ListWorkflows200Response {
|
|
|
419
451
|
* Workflow Approval System API
|
|
420
452
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
421
453
|
*
|
|
422
|
-
* The version of the OpenAPI document: 0.0.
|
|
454
|
+
* The version of the OpenAPI document: 0.0.35
|
|
423
455
|
*
|
|
424
456
|
*
|
|
425
457
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -442,7 +474,7 @@ interface TokenResponse {
|
|
|
442
474
|
* Workflow Approval System API
|
|
443
475
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
444
476
|
*
|
|
445
|
-
* The version of the OpenAPI document: 0.0.
|
|
477
|
+
* The version of the OpenAPI document: 0.0.35
|
|
446
478
|
*
|
|
447
479
|
*
|
|
448
480
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -477,7 +509,7 @@ interface User {
|
|
|
477
509
|
* Workflow Approval System API
|
|
478
510
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
479
511
|
*
|
|
480
|
-
* The version of the OpenAPI document: 0.0.
|
|
512
|
+
* The version of the OpenAPI document: 0.0.35
|
|
481
513
|
*
|
|
482
514
|
*
|
|
483
515
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -503,4 +535,4 @@ interface WorkflowCreate {
|
|
|
503
535
|
workflowTemplateId: string;
|
|
504
536
|
}
|
|
505
537
|
//#endregion
|
|
506
|
-
export {
|
|
538
|
+
export { ConcurrencyControl as _, Workflow as a, GroupRequirementRule as b, WorkflowAction as c, UserSummary as d, ListGroups200Response as f, EmailAction as g, GroupInfo as h, ListWorkflows200Response as i, WebhookAction as l, Group as m, User as n, WorkflowRef as o, Pagination as p, TokenResponse as r, WorkflowTemplate as s, WorkflowCreate as t, WorkflowTemplateStatus as u, AndRule as v, OrRule as x, ApprovalRule as y };
|
|
@@ -24,7 +24,7 @@ declare namespace OrRule {
|
|
|
24
24
|
* Workflow Approval System API
|
|
25
25
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
26
26
|
*
|
|
27
|
-
* The version of the OpenAPI document: 0.0.
|
|
27
|
+
* The version of the OpenAPI document: 0.0.35
|
|
28
28
|
*
|
|
29
29
|
*
|
|
30
30
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -91,12 +91,31 @@ declare namespace AndRule {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
|
+
//#region generated/openapi/model/concurrency-control.d.ts
|
|
95
|
+
/**
|
|
96
|
+
* Workflow Approval System API
|
|
97
|
+
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
98
|
+
*
|
|
99
|
+
* The version of the OpenAPI document: 0.0.35
|
|
100
|
+
*
|
|
101
|
+
*
|
|
102
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
103
|
+
* https://openapi-generator.tech
|
|
104
|
+
* Do not edit the class manually.
|
|
105
|
+
*/
|
|
106
|
+
interface ConcurrencyControl {
|
|
107
|
+
/**
|
|
108
|
+
* Optimistic concurrency control version to prevent race conditions and detect updates from other users.
|
|
109
|
+
*/
|
|
110
|
+
version: string;
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
94
113
|
//#region generated/openapi/model/email-action.d.ts
|
|
95
114
|
/**
|
|
96
115
|
* Workflow Approval System API
|
|
97
116
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
98
117
|
*
|
|
99
|
-
* The version of the OpenAPI document: 0.0.
|
|
118
|
+
* The version of the OpenAPI document: 0.0.35
|
|
100
119
|
*
|
|
101
120
|
*
|
|
102
121
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -128,7 +147,7 @@ declare namespace EmailAction {
|
|
|
128
147
|
* Workflow Approval System API
|
|
129
148
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
130
149
|
*
|
|
131
|
-
* The version of the OpenAPI document: 0.0.
|
|
150
|
+
* The version of the OpenAPI document: 0.0.35
|
|
132
151
|
*
|
|
133
152
|
*
|
|
134
153
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -145,7 +164,7 @@ interface GroupInfo {
|
|
|
145
164
|
* Workflow Approval System API
|
|
146
165
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
147
166
|
*
|
|
148
|
-
* The version of the OpenAPI document: 0.0.
|
|
167
|
+
* The version of the OpenAPI document: 0.0.35
|
|
149
168
|
*
|
|
150
169
|
*
|
|
151
170
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -184,7 +203,7 @@ interface Group {
|
|
|
184
203
|
* Workflow Approval System API
|
|
185
204
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
186
205
|
*
|
|
187
|
-
* The version of the OpenAPI document: 0.0.
|
|
206
|
+
* The version of the OpenAPI document: 0.0.35
|
|
188
207
|
*
|
|
189
208
|
*
|
|
190
209
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -217,7 +236,7 @@ interface ListGroups200Response {
|
|
|
217
236
|
* Workflow Approval System API
|
|
218
237
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
219
238
|
*
|
|
220
|
-
* The version of the OpenAPI document: 0.0.
|
|
239
|
+
* The version of the OpenAPI document: 0.0.35
|
|
221
240
|
*
|
|
222
241
|
*
|
|
223
242
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -239,12 +258,34 @@ interface UserSummary {
|
|
|
239
258
|
email: string;
|
|
240
259
|
}
|
|
241
260
|
//#endregion
|
|
261
|
+
//#region generated/openapi/model/workflow-template-status.d.ts
|
|
262
|
+
/**
|
|
263
|
+
* Workflow Approval System API
|
|
264
|
+
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
265
|
+
*
|
|
266
|
+
* The version of the OpenAPI document: 0.0.35
|
|
267
|
+
*
|
|
268
|
+
*
|
|
269
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
270
|
+
* https://openapi-generator.tech
|
|
271
|
+
* Do not edit the class manually.
|
|
272
|
+
*/
|
|
273
|
+
/**
|
|
274
|
+
* Lifecycle status of the template: * ACTIVE - Template can be referenced to create new workflows * PENDING_DEPRECATION - Template has been deprecated but there are still active workflows (intermediate status for async deprecation) * DEPRECATED - Template cannot be referenced for new workflows, voting may still be allowed based on settings
|
|
275
|
+
*/
|
|
276
|
+
type WorkflowTemplateStatus = 'ACTIVE' | 'PENDING_DEPRECATION' | 'DEPRECATED';
|
|
277
|
+
declare const WorkflowTemplateStatus: {
|
|
278
|
+
Active: WorkflowTemplateStatus;
|
|
279
|
+
PendingDeprecation: WorkflowTemplateStatus;
|
|
280
|
+
Deprecated: WorkflowTemplateStatus;
|
|
281
|
+
};
|
|
282
|
+
//#endregion
|
|
242
283
|
//#region generated/openapi/model/webhook-action.d.ts
|
|
243
284
|
/**
|
|
244
285
|
* Workflow Approval System API
|
|
245
286
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
246
287
|
*
|
|
247
|
-
* The version of the OpenAPI document: 0.0.
|
|
288
|
+
* The version of the OpenAPI document: 0.0.35
|
|
248
289
|
*
|
|
249
290
|
*
|
|
250
291
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -270,7 +311,7 @@ interface WebhookAction {
|
|
|
270
311
|
/**
|
|
271
312
|
* Optional headers to send with the request
|
|
272
313
|
*/
|
|
273
|
-
headers?: {
|
|
314
|
+
'headers'?: {
|
|
274
315
|
[key: string]: string;
|
|
275
316
|
};
|
|
276
317
|
}
|
|
@@ -316,10 +357,7 @@ interface WorkflowTemplate {
|
|
|
316
357
|
* Detailed description of the workflow template
|
|
317
358
|
*/
|
|
318
359
|
description?: string;
|
|
319
|
-
|
|
320
|
-
* Lifecycle status of the template: * ACTIVE - Template can be referenced to create new workflows * PENDING_DEPRECATION - Template has been deprecated but there are still active workflows (intermediate status for async deprecation) * DEPRECATED - Template cannot be referenced for new workflows, voting may still be allowed based on settings
|
|
321
|
-
*/
|
|
322
|
-
status: WorkflowTemplate.StatusEnum;
|
|
360
|
+
status: WorkflowTemplateStatus;
|
|
323
361
|
/**
|
|
324
362
|
* Whether voting is allowed on workflows using this template when it\'s deprecated
|
|
325
363
|
*/
|
|
@@ -349,15 +387,9 @@ interface WorkflowTemplate {
|
|
|
349
387
|
* Last update timestamp
|
|
350
388
|
*/
|
|
351
389
|
updatedAt: string;
|
|
390
|
+
concurrencyControl: ConcurrencyControl;
|
|
352
391
|
}
|
|
353
|
-
declare namespace WorkflowTemplate {
|
|
354
|
-
type StatusEnum = 'ACTIVE' | 'PENDING_DEPRECATION' | 'DEPRECATED';
|
|
355
|
-
const StatusEnum: {
|
|
356
|
-
Active: StatusEnum;
|
|
357
|
-
PendingDeprecation: StatusEnum;
|
|
358
|
-
Deprecated: StatusEnum;
|
|
359
|
-
};
|
|
360
|
-
}
|
|
392
|
+
declare namespace WorkflowTemplate {}
|
|
361
393
|
//#endregion
|
|
362
394
|
//#region generated/openapi/model/workflow-ref.d.ts
|
|
363
395
|
/**
|
|
@@ -419,7 +451,7 @@ interface ListWorkflows200Response {
|
|
|
419
451
|
* Workflow Approval System API
|
|
420
452
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
421
453
|
*
|
|
422
|
-
* The version of the OpenAPI document: 0.0.
|
|
454
|
+
* The version of the OpenAPI document: 0.0.35
|
|
423
455
|
*
|
|
424
456
|
*
|
|
425
457
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -442,7 +474,7 @@ interface TokenResponse {
|
|
|
442
474
|
* Workflow Approval System API
|
|
443
475
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
444
476
|
*
|
|
445
|
-
* The version of the OpenAPI document: 0.0.
|
|
477
|
+
* The version of the OpenAPI document: 0.0.35
|
|
446
478
|
*
|
|
447
479
|
*
|
|
448
480
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -477,7 +509,7 @@ interface User {
|
|
|
477
509
|
* Workflow Approval System API
|
|
478
510
|
* API for a SaaS platform that allows customers to manage approvals for generic workflows, users, and groups.
|
|
479
511
|
*
|
|
480
|
-
* The version of the OpenAPI document: 0.0.
|
|
512
|
+
* The version of the OpenAPI document: 0.0.35
|
|
481
513
|
*
|
|
482
514
|
*
|
|
483
515
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -503,4 +535,4 @@ interface WorkflowCreate {
|
|
|
503
535
|
workflowTemplateId: string;
|
|
504
536
|
}
|
|
505
537
|
//#endregion
|
|
506
|
-
export {
|
|
538
|
+
export { ConcurrencyControl as _, Workflow as a, GroupRequirementRule as b, WorkflowAction as c, UserSummary as d, ListGroups200Response as f, EmailAction as g, GroupInfo as h, ListWorkflows200Response as i, WebhookAction as l, Group as m, User as n, WorkflowRef as o, Pagination as p, TokenResponse as r, WorkflowTemplate as s, WorkflowCreate as t, WorkflowTemplateStatus as u, AndRule as v, OrRule as x, ApprovalRule as y };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@approvio/api",
|
|
3
3
|
"author": "Giovanni Baratta",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.40",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/src/index.cjs",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@eslint/js": "10.0.1",
|
|
49
|
-
"@openapitools/openapi-generator-cli": "^2.
|
|
49
|
+
"@openapitools/openapi-generator-cli": "^2.31.0",
|
|
50
50
|
"@redocly/cli": "1.34.4",
|
|
51
51
|
"@stoplight/spectral-cli": "6.15.0",
|
|
52
52
|
"@types/jest": "30.0.0",
|