@dfns/sdk 0.3.0 → 0.3.2
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/codegen/datamodel/Assets/types.d.ts +1 -7
- package/codegen/datamodel/Wallets/types.d.ts +152 -45
- package/codegen/datamodel/Wallets/types.js +34 -4
- package/dfnsApiClient.d.ts +2 -12
- package/dfnsApiClient.js +4 -18
- package/dfnsDelegatedApiClient.d.ts +2 -12
- package/dfnsDelegatedApiClient.js +4 -18
- package/generated/networks/client.d.ts +8 -0
- package/generated/networks/client.js +34 -0
- package/generated/networks/delegatedClient.d.ts +8 -0
- package/generated/networks/delegatedClient.js +34 -0
- package/generated/networks/index.d.ts +3 -0
- package/{codegen/datamodel/Orgs → generated/networks}/index.js +2 -1
- package/generated/networks/types.d.ts +37 -0
- package/generated/permissions/types.d.ts +49 -4
- package/generated/policies/types.d.ts +286 -30
- package/generated/wallets/types.d.ts +94 -33
- package/generated/webhooks/types.d.ts +10 -9
- package/package.json +1 -1
- package/types/networks.d.ts +1 -0
- package/{codegen/datamodel/BlockchainIndexing/index.js → types/networks.js} +1 -1
- package/codegen/Blockchains/BlockchainsClient.d.ts +0 -7
- package/codegen/Blockchains/BlockchainsClient.js +0 -23
- package/codegen/Blockchains/DelegatedBlockchainsClient.d.ts +0 -7
- package/codegen/Blockchains/DelegatedBlockchainsClient.js +0 -23
- package/codegen/Blockchains/index.d.ts +0 -3
- package/codegen/Blockchains/index.js +0 -19
- package/codegen/Blockchains/types.d.ts +0 -6
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.d.ts +0 -11
- package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.js +0 -61
- package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +0 -9
- package/codegen/PolicyExecution/PolicyExecutionClient.js +0 -45
- package/codegen/PolicyExecution/index.d.ts +0 -3
- package/codegen/PolicyExecution/index.js +0 -19
- package/codegen/PolicyExecution/types.d.ts +0 -18
- package/codegen/PolicyExecution/types.js +0 -2
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +0 -25
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +0 -240
- package/codegen/PolicyManagement/PolicyManagementClient.d.ts +0 -18
- package/codegen/PolicyManagement/PolicyManagementClient.js +0 -146
- package/codegen/PolicyManagement/index.d.ts +0 -3
- package/codegen/PolicyManagement/index.js +0 -19
- package/codegen/PolicyManagement/types.d.ts +0 -51
- package/codegen/PolicyManagement/types.js +0 -2
- package/codegen/Signers/DelegatedSignersClient.d.ts +0 -7
- package/codegen/Signers/DelegatedSignersClient.js +0 -22
- package/codegen/Signers/SignersClient.d.ts +0 -7
- package/codegen/Signers/SignersClient.js +0 -22
- package/codegen/Signers/index.d.ts +0 -3
- package/codegen/Signers/index.js +0 -19
- package/codegen/Signers/types.d.ts +0 -2
- package/codegen/Signers/types.js +0 -2
- package/codegen/datamodel/ApiKeys/errors.d.ts +0 -6
- package/codegen/datamodel/ApiKeys/errors.js +0 -15
- package/codegen/datamodel/ApiKeys/index.d.ts +0 -3
- package/codegen/datamodel/ApiKeys/index.js +0 -19
- package/codegen/datamodel/ApiKeys/responses.d.ts +0 -25
- package/codegen/datamodel/ApiKeys/responses.js +0 -2
- package/codegen/datamodel/ApiKeys/types.d.ts +0 -32
- package/codegen/datamodel/ApiKeys/types.js +0 -11
- package/codegen/datamodel/BlockchainIndexing/errors.d.ts +0 -0
- package/codegen/datamodel/BlockchainIndexing/errors.js +0 -1
- package/codegen/datamodel/BlockchainIndexing/index.d.ts +0 -1
- package/codegen/datamodel/BlockchainIndexing/responses.d.ts +0 -6
- package/codegen/datamodel/BlockchainIndexing/responses.js +0 -2
- package/codegen/datamodel/BlockchainIndexing/types.d.ts +0 -0
- package/codegen/datamodel/BlockchainIndexing/types.js +0 -1
- package/codegen/datamodel/Blockchains/errors.d.ts +0 -0
- package/codegen/datamodel/Blockchains/errors.js +0 -1
- package/codegen/datamodel/Blockchains/index.d.ts +0 -2
- package/codegen/datamodel/Blockchains/index.js +0 -18
- package/codegen/datamodel/Blockchains/responses.d.ts +0 -12
- package/codegen/datamodel/Blockchains/responses.js +0 -2
- package/codegen/datamodel/Blockchains/types.d.ts +0 -270
- package/codegen/datamodel/Blockchains/types.js +0 -53
- package/codegen/datamodel/Orgs/errors.d.ts +0 -0
- package/codegen/datamodel/Orgs/errors.js +0 -1
- package/codegen/datamodel/Orgs/index.d.ts +0 -2
- package/codegen/datamodel/Orgs/responses.d.ts +0 -45
- package/codegen/datamodel/Orgs/responses.js +0 -2
- package/codegen/datamodel/Orgs/types.d.ts +0 -240
- package/codegen/datamodel/Orgs/types.js +0 -39
- package/codegen/datamodel/Permissions/errors.d.ts +0 -0
- package/codegen/datamodel/Permissions/errors.js +0 -1
- package/codegen/datamodel/Permissions/index.d.ts +0 -2
- package/codegen/datamodel/Permissions/index.js +0 -18
- package/codegen/datamodel/Permissions/responses.d.ts +0 -75
- package/codegen/datamodel/Permissions/responses.js +0 -2
- package/codegen/datamodel/Permissions/types.d.ts +0 -93
- package/codegen/datamodel/Permissions/types.js +0 -43
- package/codegen/datamodel/PolicyExecution/errors.d.ts +0 -11
- package/codegen/datamodel/PolicyExecution/errors.js +0 -17
- package/codegen/datamodel/PolicyExecution/index.d.ts +0 -3
- package/codegen/datamodel/PolicyExecution/index.js +0 -19
- package/codegen/datamodel/PolicyExecution/responses.d.ts +0 -19
- package/codegen/datamodel/PolicyExecution/responses.js +0 -2
- package/codegen/datamodel/PolicyExecution/types.d.ts +0 -60
- package/codegen/datamodel/PolicyExecution/types.js +0 -17
- package/codegen/datamodel/PolicyManagement/errors.d.ts +0 -0
- package/codegen/datamodel/PolicyManagement/errors.js +0 -1
- package/codegen/datamodel/PolicyManagement/index.d.ts +0 -2
- package/codegen/datamodel/PolicyManagement/index.js +0 -18
- package/codegen/datamodel/PolicyManagement/responses.d.ts +0 -83
- package/codegen/datamodel/PolicyManagement/responses.js +0 -2
- package/codegen/datamodel/PolicyManagement/types.d.ts +0 -391
- package/codegen/datamodel/PolicyManagement/types.js +0 -95
- package/codegen/datamodel/Signers/errors.d.ts +0 -0
- package/codegen/datamodel/Signers/errors.js +0 -1
- package/codegen/datamodel/Signers/index.d.ts +0 -2
- package/codegen/datamodel/Signers/index.js +0 -18
- package/codegen/datamodel/Signers/responses.d.ts +0 -27
- package/codegen/datamodel/Signers/responses.js +0 -2
- package/codegen/datamodel/Signers/types.d.ts +0 -21
- package/codegen/datamodel/Signers/types.js +0 -2
- /package/{codegen/Blockchains → generated/networks}/types.js +0 -0
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { BadRequestError, DuplicateError, EntityNotFoundError, ForbiddenError, UnauthorizedError } from '../Foundations';
|
|
2
|
-
import { DeletionAcknowledgement, Permission, PermissionAssignment, PermissionPredicate } from './types';
|
|
3
|
-
export type CreatePermissionSuccess = Permission;
|
|
4
|
-
export type CreatePermissionError = {
|
|
5
|
-
error: BadRequestError | DuplicateError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
6
|
-
};
|
|
7
|
-
export type CreatePermissionResponse = CreatePermissionSuccess | CreatePermissionError;
|
|
8
|
-
export type UpdatePermissionSuccess = Permission;
|
|
9
|
-
export type UpdatePermissionError = {
|
|
10
|
-
error: BadRequestError | EntityNotFoundError | ForbiddenError | DuplicateError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
11
|
-
};
|
|
12
|
-
export type UpdatePermissionResponse = UpdatePermissionSuccess | UpdatePermissionError;
|
|
13
|
-
export type ArchivePermissionSuccess = Permission;
|
|
14
|
-
export type ArchivePermissionError = {
|
|
15
|
-
error: EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
16
|
-
};
|
|
17
|
-
export type ArchivePermissionResponse = ArchivePermissionSuccess | ArchivePermissionError;
|
|
18
|
-
export type GetPermissionByIdSuccess = Permission;
|
|
19
|
-
export type GetPermissionByIdError = {
|
|
20
|
-
error: EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
21
|
-
};
|
|
22
|
-
export type GetPermissionByIdResponse = GetPermissionByIdSuccess | GetPermissionByIdError;
|
|
23
|
-
export type ListPermissionsSuccess = {
|
|
24
|
-
items: Permission[];
|
|
25
|
-
};
|
|
26
|
-
export type ListPermissionsError = {
|
|
27
|
-
error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
28
|
-
};
|
|
29
|
-
export type ListPermissionsResponse = ListPermissionsSuccess | ListPermissionsError;
|
|
30
|
-
export type CreatePermissionPredicateSuccess = PermissionPredicate;
|
|
31
|
-
export type CreatePermissionPredicateError = {
|
|
32
|
-
error: BadRequestError | DuplicateError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
33
|
-
};
|
|
34
|
-
export type CreatePermissionPredicateResponse = CreatePermissionPredicateSuccess | CreatePermissionPredicateError;
|
|
35
|
-
export type UpdatePermissionPredicateSuccess = PermissionPredicate;
|
|
36
|
-
export type UpdatePermissionPredicateError = {
|
|
37
|
-
error: BadRequestError | EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
38
|
-
};
|
|
39
|
-
export type UpdatePermissionPredicateResponse = UpdatePermissionPredicateSuccess | UpdatePermissionPredicateError;
|
|
40
|
-
export type ArchivePermissionPredicateSuccess = PermissionPredicate;
|
|
41
|
-
export type ArchivePermissionPredicateError = {
|
|
42
|
-
error: EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
43
|
-
};
|
|
44
|
-
export type ArchivePermissionPredicateResponse = ArchivePermissionPredicateSuccess | ArchivePermissionPredicateError;
|
|
45
|
-
export type ListPermissionPredicatesSuccess = {
|
|
46
|
-
items: PermissionPredicate[];
|
|
47
|
-
};
|
|
48
|
-
export type ListPermissionPredicatesError = {
|
|
49
|
-
error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
50
|
-
};
|
|
51
|
-
export type ListPermissionPredicatesResponse = ListPermissionPredicatesSuccess | ListPermissionPredicatesError;
|
|
52
|
-
export type CreatePermissionAssignmentSuccess = PermissionAssignment;
|
|
53
|
-
export type CreatePermissionAssignmentError = {
|
|
54
|
-
error: BadRequestError | EntityNotFoundError | DuplicateError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
55
|
-
};
|
|
56
|
-
export type CreatePermissionAssignmentResponse = CreatePermissionAssignmentSuccess | CreatePermissionAssignmentError;
|
|
57
|
-
export type RevokePermissionAssignmentSuccess = DeletionAcknowledgement;
|
|
58
|
-
export type RevokePermissionAssignmentError = {
|
|
59
|
-
error: EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
60
|
-
};
|
|
61
|
-
export type RevokePermissionAssignmentResponse = RevokePermissionAssignmentSuccess | RevokePermissionAssignmentError;
|
|
62
|
-
export type ListPermissionAssignmentsSuccess = {
|
|
63
|
-
items: PermissionAssignment[];
|
|
64
|
-
};
|
|
65
|
-
export type ListPermissionAssignmentsError = {
|
|
66
|
-
error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
67
|
-
};
|
|
68
|
-
export type ListPermissionAssignmentsResponse = ListPermissionAssignmentsSuccess | ListPermissionAssignmentsError;
|
|
69
|
-
export type ListPermissionsHistoricalSuccess = {
|
|
70
|
-
items: Permission[];
|
|
71
|
-
};
|
|
72
|
-
export type ListPermissionsHistoricalError = {
|
|
73
|
-
error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
74
|
-
};
|
|
75
|
-
export type ListPermissionsHistoricalResponse = ListPermissionsHistoricalSuccess | ListPermissionsHistoricalError;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { EntityId, IsoDatetime } from '../Foundations';
|
|
2
|
-
export type Permission = {
|
|
3
|
-
id: EntityId;
|
|
4
|
-
orgId: EntityId;
|
|
5
|
-
name: string;
|
|
6
|
-
operations: string[];
|
|
7
|
-
status: PermissionStatus;
|
|
8
|
-
resourceId?: string;
|
|
9
|
-
isImmutable: boolean;
|
|
10
|
-
predicates?: PermissionPredicate[];
|
|
11
|
-
dateCreated: IsoDatetime;
|
|
12
|
-
dateUpdated: IsoDatetime;
|
|
13
|
-
isArchived: boolean;
|
|
14
|
-
};
|
|
15
|
-
export type PermissionPredicate = {
|
|
16
|
-
id: EntityId;
|
|
17
|
-
permissionId: EntityId;
|
|
18
|
-
fieldName: string;
|
|
19
|
-
evaluatorKind: FieldEvaluatorKind;
|
|
20
|
-
parameters: string[];
|
|
21
|
-
isImmutable: boolean;
|
|
22
|
-
dateCreated: IsoDatetime;
|
|
23
|
-
dateUpdated: IsoDatetime;
|
|
24
|
-
isArchived: boolean;
|
|
25
|
-
};
|
|
26
|
-
export type PermissionAssignment = {
|
|
27
|
-
id: EntityId;
|
|
28
|
-
permissionId: string;
|
|
29
|
-
identityId: EntityId;
|
|
30
|
-
dateCreated: IsoDatetime;
|
|
31
|
-
dateUpdated: IsoDatetime;
|
|
32
|
-
};
|
|
33
|
-
export type DeletionAcknowledgement = {
|
|
34
|
-
id: string;
|
|
35
|
-
};
|
|
36
|
-
export type ResourceOwnership = {
|
|
37
|
-
id: EntityId;
|
|
38
|
-
orgId: EntityId;
|
|
39
|
-
resourceId: EntityId;
|
|
40
|
-
resourceKind: string;
|
|
41
|
-
ownerId: EntityId;
|
|
42
|
-
ownerKind: OwnerKind;
|
|
43
|
-
dateCreated: IsoDatetime;
|
|
44
|
-
dateUpdated: IsoDatetime;
|
|
45
|
-
};
|
|
46
|
-
export type CreatePermissionInput = {
|
|
47
|
-
name: string;
|
|
48
|
-
operations: string[];
|
|
49
|
-
};
|
|
50
|
-
export type UpdatePermissionInput = {
|
|
51
|
-
name?: string;
|
|
52
|
-
operations?: string[];
|
|
53
|
-
};
|
|
54
|
-
export type ArchivePermissionInput = {
|
|
55
|
-
isArchived: boolean;
|
|
56
|
-
};
|
|
57
|
-
export type CreatePermissionPredicateInput = {
|
|
58
|
-
fieldName: string;
|
|
59
|
-
evaluatorKind: FieldEvaluatorKind;
|
|
60
|
-
parameters: string[];
|
|
61
|
-
};
|
|
62
|
-
export type UpdatePermissionPredicateInput = {
|
|
63
|
-
fieldName?: string;
|
|
64
|
-
evaluatorKind?: FieldEvaluatorKind;
|
|
65
|
-
parameters?: string[];
|
|
66
|
-
};
|
|
67
|
-
export type ArchivePermissionPredicateInput = {
|
|
68
|
-
isArchived: boolean;
|
|
69
|
-
};
|
|
70
|
-
export type CreatePermissionAssignmentInput = {
|
|
71
|
-
permissionId: string;
|
|
72
|
-
identityId: string;
|
|
73
|
-
};
|
|
74
|
-
export declare enum FieldEvaluatorKind {
|
|
75
|
-
ContainsAll = "ContainsAll",
|
|
76
|
-
ContainsOneOf = "ContainsOneOf",
|
|
77
|
-
DateAfter = "DateAfter",
|
|
78
|
-
DateBefore = "DateBefore",
|
|
79
|
-
Is = "Is",
|
|
80
|
-
ValueGreaterThan = "ValueGreaterThan",
|
|
81
|
-
ValueLessThan = "ValueLessThan"
|
|
82
|
-
}
|
|
83
|
-
export declare enum PermissionStatus {
|
|
84
|
-
Active = "Active"
|
|
85
|
-
}
|
|
86
|
-
export declare enum OwnerKind {
|
|
87
|
-
LegalPerson = "LegalPerson",
|
|
88
|
-
NaturalPerson = "NaturalPerson"
|
|
89
|
-
}
|
|
90
|
-
export declare enum ResourceKind {
|
|
91
|
-
Wallet = "Wallet",
|
|
92
|
-
PublicKey = "PublicKey"
|
|
93
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResourceKind = exports.OwnerKind = exports.PermissionStatus = exports.FieldEvaluatorKind = void 0;
|
|
4
|
-
// FIXME: Missing documentation for FieldEvaluatorKind
|
|
5
|
-
var FieldEvaluatorKind;
|
|
6
|
-
(function (FieldEvaluatorKind) {
|
|
7
|
-
// FIXME: Missing documentation for ContainsAll
|
|
8
|
-
FieldEvaluatorKind["ContainsAll"] = "ContainsAll";
|
|
9
|
-
// FIXME: Missing documentation for ContainsOneOf
|
|
10
|
-
FieldEvaluatorKind["ContainsOneOf"] = "ContainsOneOf";
|
|
11
|
-
// FIXME: Missing documentation for DateAfter
|
|
12
|
-
FieldEvaluatorKind["DateAfter"] = "DateAfter";
|
|
13
|
-
// FIXME: Missing documentation for DateBefore
|
|
14
|
-
FieldEvaluatorKind["DateBefore"] = "DateBefore";
|
|
15
|
-
// FIXME: Missing documentation for Is
|
|
16
|
-
FieldEvaluatorKind["Is"] = "Is";
|
|
17
|
-
// FIXME: Missing documentation for ValueGreaterThan
|
|
18
|
-
FieldEvaluatorKind["ValueGreaterThan"] = "ValueGreaterThan";
|
|
19
|
-
// FIXME: Missing documentation for ValueLessThan
|
|
20
|
-
FieldEvaluatorKind["ValueLessThan"] = "ValueLessThan";
|
|
21
|
-
})(FieldEvaluatorKind || (exports.FieldEvaluatorKind = FieldEvaluatorKind = {}));
|
|
22
|
-
// FIXME: Missing documentation for PermissionStatus
|
|
23
|
-
var PermissionStatus;
|
|
24
|
-
(function (PermissionStatus) {
|
|
25
|
-
// FIXME: Missing documentation for Active
|
|
26
|
-
PermissionStatus["Active"] = "Active";
|
|
27
|
-
})(PermissionStatus || (exports.PermissionStatus = PermissionStatus = {}));
|
|
28
|
-
// FIXME: Missing documentation for OwnerKind
|
|
29
|
-
var OwnerKind;
|
|
30
|
-
(function (OwnerKind) {
|
|
31
|
-
// FIXME: Missing documentation for LegalPerson
|
|
32
|
-
OwnerKind["LegalPerson"] = "LegalPerson";
|
|
33
|
-
// FIXME: Missing documentation for NaturalPerson
|
|
34
|
-
OwnerKind["NaturalPerson"] = "NaturalPerson";
|
|
35
|
-
})(OwnerKind || (exports.OwnerKind = OwnerKind = {}));
|
|
36
|
-
// FIXME: Missing documentation for ResourceKind
|
|
37
|
-
var ResourceKind;
|
|
38
|
-
(function (ResourceKind) {
|
|
39
|
-
// FIXME: Missing documentation for Wallet
|
|
40
|
-
ResourceKind["Wallet"] = "Wallet";
|
|
41
|
-
// FIXME: Missing documentation for PublicKey
|
|
42
|
-
ResourceKind["PublicKey"] = "PublicKey";
|
|
43
|
-
})(ResourceKind || (exports.ResourceKind = ResourceKind = {}));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DfnsError } from '../Foundations';
|
|
2
|
-
export declare class PolicyApprovalNotAllowedError extends DfnsError {
|
|
3
|
-
name: string;
|
|
4
|
-
serviceName: string;
|
|
5
|
-
message: string;
|
|
6
|
-
causes?: string[];
|
|
7
|
-
shouldTriggerInvestigaton: boolean;
|
|
8
|
-
isDfnsError: boolean;
|
|
9
|
-
httpStatus: number;
|
|
10
|
-
errorName: string;
|
|
11
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PolicyApprovalNotAllowedError = void 0;
|
|
4
|
-
const Foundations_1 = require("../Foundations");
|
|
5
|
-
class PolicyApprovalNotAllowedError extends Foundations_1.DfnsError {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.name = 'PolicyApprovalNotAllowedError';
|
|
9
|
-
// FIXME: Missing documentation for isDfnsError
|
|
10
|
-
this.isDfnsError = true;
|
|
11
|
-
// FIXME: Missing documentation for httpStatus
|
|
12
|
-
this.httpStatus = 403;
|
|
13
|
-
// FIXME: Missing documentation for errorName
|
|
14
|
-
this.errorName = 'Policy Approval Not Allowed';
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.PolicyApprovalNotAllowedError = PolicyApprovalNotAllowedError;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./errors"), exports);
|
|
18
|
-
__exportStar(require("./responses"), exports);
|
|
19
|
-
__exportStar(require("./types"), exports);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { BadRequestError, EntityNotFoundError, ForbiddenError, UnauthorizedError } from '../Foundations';
|
|
2
|
-
import { PolicyControlExecution } from './types';
|
|
3
|
-
export type ListPolicyControlExecutionsSuccess = {
|
|
4
|
-
items: PolicyControlExecution[];
|
|
5
|
-
};
|
|
6
|
-
export type ListPolicyControlExecutionsError = {
|
|
7
|
-
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
8
|
-
};
|
|
9
|
-
export type ListPolicyControlExecutionsResponse = ListPolicyControlExecutionsSuccess | ListPolicyControlExecutionsError;
|
|
10
|
-
export type GetPolicyControlExecutionByIdSuccess = PolicyControlExecution;
|
|
11
|
-
export type GetPolicyControlExecutionByIdError = {
|
|
12
|
-
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
13
|
-
};
|
|
14
|
-
export type GetPolicyControlExecutionByIdResponse = GetPolicyControlExecutionByIdSuccess | GetPolicyControlExecutionByIdError;
|
|
15
|
-
export type UpdatePolicyControlExecutionSuccess = PolicyControlExecution;
|
|
16
|
-
export type UpdatePolicyControlExecutionError = {
|
|
17
|
-
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
18
|
-
};
|
|
19
|
-
export type UpdatePolicyControlExecutionResponse = UpdatePolicyControlExecutionSuccess | UpdatePolicyControlExecutionError;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { DocumentSnapshot, EntityId, InitiatorKind, IsoDatetime } from '../Foundations';
|
|
2
|
-
import { PolicyActivityKind, PolicyControlKind } from '../PolicyManagement';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated use the new policy engine instead
|
|
5
|
-
*/
|
|
6
|
-
export type PolicyExecution = {
|
|
7
|
-
id: EntityId;
|
|
8
|
-
kind: PolicyActivityKind;
|
|
9
|
-
status: ExecutionStatus;
|
|
10
|
-
orgId: EntityId;
|
|
11
|
-
dateCreated: IsoDatetime;
|
|
12
|
-
initiatorKind: InitiatorKind;
|
|
13
|
-
initiatingEventId: EntityId;
|
|
14
|
-
/**
|
|
15
|
-
* Applied poliies stored along with PolicyExecution status as-raw-json-string. This ensures that even if somebody tampers with policy, the audit log would have actual-literal representation of what was executed.
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
documentedPolicies?: DocumentSnapshot[];
|
|
19
|
-
documentedActivity: DocumentSnapshot;
|
|
20
|
-
controlExecutions?: PolicyControlExecution[];
|
|
21
|
-
policyId: EntityId;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated use the new policy engine instead
|
|
25
|
-
*/
|
|
26
|
-
export type PolicyControlExecution = {
|
|
27
|
-
id: EntityId;
|
|
28
|
-
status: ExecutionStatus;
|
|
29
|
-
controlId: EntityId;
|
|
30
|
-
dateExecuted: IsoDatetime;
|
|
31
|
-
dateFullfiled?: IsoDatetime;
|
|
32
|
-
policyExecutionId: EntityId;
|
|
33
|
-
approvals?: string[];
|
|
34
|
-
documentedActivity: DocumentSnapshot;
|
|
35
|
-
controlKind: PolicyControlKind;
|
|
36
|
-
author: EntityId;
|
|
37
|
-
approverUsernames?: string[];
|
|
38
|
-
activityKind: PolicyActivityKind;
|
|
39
|
-
numApprovals?: number;
|
|
40
|
-
activityId: string;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated use the new policy engine instead
|
|
44
|
-
*/
|
|
45
|
-
export type AppraisableActivity = {};
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated use the new policy engine instead
|
|
48
|
-
*/
|
|
49
|
-
export type UpdatePolicyControlExecutionInput = {
|
|
50
|
-
status: ExecutionStatus;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated use the new policy engine instead
|
|
54
|
-
*/
|
|
55
|
-
export declare enum ExecutionStatus {
|
|
56
|
-
Awaiting = "Awaiting",
|
|
57
|
-
Passed = "Passed",
|
|
58
|
-
Failed = "Failed",
|
|
59
|
-
Timedout = "Timedout"
|
|
60
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExecutionStatus = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated use the new policy engine instead
|
|
6
|
-
*/
|
|
7
|
-
var ExecutionStatus;
|
|
8
|
-
(function (ExecutionStatus) {
|
|
9
|
-
// FIXME: Missing documentation for Awaiting
|
|
10
|
-
ExecutionStatus["Awaiting"] = "Awaiting";
|
|
11
|
-
// FIXME: Missing documentation for Passed
|
|
12
|
-
ExecutionStatus["Passed"] = "Passed";
|
|
13
|
-
// FIXME: Missing documentation for Failed
|
|
14
|
-
ExecutionStatus["Failed"] = "Failed";
|
|
15
|
-
// FIXME: Missing documentation for Timedout
|
|
16
|
-
ExecutionStatus["Timedout"] = "Timedout";
|
|
17
|
-
})(ExecutionStatus || (exports.ExecutionStatus = ExecutionStatus = {}));
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./responses"), exports);
|
|
18
|
-
__exportStar(require("./types"), exports);
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { BadRequestError, EntityNotFoundError, ForbiddenError, UnauthorizedError } from '../Foundations';
|
|
2
|
-
import { Policy, PolicyControl, PolicyRule } from './types';
|
|
3
|
-
export type CreatePolicySuccess = Policy;
|
|
4
|
-
export type CreatePolicyError = {
|
|
5
|
-
error: BadRequestError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
6
|
-
};
|
|
7
|
-
export type CreatePolicyResponse = CreatePolicySuccess | CreatePolicyError;
|
|
8
|
-
export type UpdatePolicySuccess = Policy;
|
|
9
|
-
export type UpdatePolicyError = {
|
|
10
|
-
error: BadRequestError | EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
11
|
-
};
|
|
12
|
-
export type UpdatePolicyResponse = UpdatePolicySuccess | UpdatePolicyError;
|
|
13
|
-
export type GetPolicyByIdSuccess = Policy;
|
|
14
|
-
export type GetPolicyByIdError = {
|
|
15
|
-
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
16
|
-
};
|
|
17
|
-
export type GetPolicyByIdResponse = GetPolicyByIdSuccess | GetPolicyByIdError;
|
|
18
|
-
export type ListPoliciesSuccess = {
|
|
19
|
-
items: Policy[];
|
|
20
|
-
};
|
|
21
|
-
export type ListPoliciesError = {
|
|
22
|
-
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
23
|
-
};
|
|
24
|
-
export type ListPoliciesResponse = ListPoliciesSuccess | ListPoliciesError;
|
|
25
|
-
export type ArchivePolicySuccess = Policy;
|
|
26
|
-
export type ArchivePolicyError = {
|
|
27
|
-
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
28
|
-
};
|
|
29
|
-
export type ArchivePolicyResponse = ArchivePolicySuccess | ArchivePolicyError;
|
|
30
|
-
export type CreatePolicyControlSuccess = PolicyControl;
|
|
31
|
-
export type CreatePolicyControlError = {
|
|
32
|
-
error: BadRequestError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
33
|
-
};
|
|
34
|
-
export type CreatePolicyControlResponse = CreatePolicyControlSuccess | CreatePolicyControlError;
|
|
35
|
-
export type UpdatePolicyControlSuccess = PolicyControl;
|
|
36
|
-
export type UpdatePolicyControlError = {
|
|
37
|
-
error: BadRequestError | EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
38
|
-
};
|
|
39
|
-
export type UpdatePolicyControlResponse = UpdatePolicyControlSuccess | UpdatePolicyControlError;
|
|
40
|
-
export type GetPolicyControlByIdSuccess = PolicyControl;
|
|
41
|
-
export type GetPolicyControlByIdError = {
|
|
42
|
-
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
43
|
-
};
|
|
44
|
-
export type GetPolicyControlByIdResponse = GetPolicyControlByIdSuccess | GetPolicyControlByIdError;
|
|
45
|
-
export type ListPolicyControlsSuccess = {
|
|
46
|
-
items: PolicyControl[];
|
|
47
|
-
};
|
|
48
|
-
export type ListPolicyControlsError = {
|
|
49
|
-
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
50
|
-
};
|
|
51
|
-
export type ListPolicyControlsResponse = ListPolicyControlsSuccess | ListPolicyControlsError;
|
|
52
|
-
export type ArchivePolicyControlSuccess = PolicyControl;
|
|
53
|
-
export type ArchivePolicyControlError = {
|
|
54
|
-
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
55
|
-
};
|
|
56
|
-
export type ArchivePolicyControlResponse = ArchivePolicyControlSuccess | ArchivePolicyControlError;
|
|
57
|
-
export type CreatePolicyRuleSuccess = PolicyRule;
|
|
58
|
-
export type CreatePolicyRuleError = {
|
|
59
|
-
error: BadRequestError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
60
|
-
};
|
|
61
|
-
export type CreatePolicyRuleResponse = CreatePolicyRuleSuccess | CreatePolicyRuleError;
|
|
62
|
-
export type UpdatePolicyRuleSuccess = PolicyRule;
|
|
63
|
-
export type UpdatePolicyRuleError = {
|
|
64
|
-
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
65
|
-
};
|
|
66
|
-
export type UpdatePolicyRuleResponse = UpdatePolicyRuleSuccess | UpdatePolicyRuleError;
|
|
67
|
-
export type GetPolicyRuleByIdSuccess = PolicyRule;
|
|
68
|
-
export type GetPolicyRuleByIdError = {
|
|
69
|
-
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
70
|
-
};
|
|
71
|
-
export type GetPolicyRuleByIdResponse = GetPolicyRuleByIdSuccess | GetPolicyRuleByIdError;
|
|
72
|
-
export type ListPolicyRulesSuccess = {
|
|
73
|
-
items: PolicyRule[];
|
|
74
|
-
};
|
|
75
|
-
export type ListPolicyRulesError = {
|
|
76
|
-
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
77
|
-
};
|
|
78
|
-
export type ListPolicyRulesResponse = ListPolicyRulesSuccess | ListPolicyRulesError;
|
|
79
|
-
export type ArchivePolicyRuleSuccess = PolicyRule;
|
|
80
|
-
export type ArchivePolicyRuleError = {
|
|
81
|
-
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
82
|
-
};
|
|
83
|
-
export type ArchivePolicyRuleResponse = ArchivePolicyRuleSuccess | ArchivePolicyRuleError;
|