@dfns/sdk 0.1.0-alpha.3 → 0.1.0-alpha.4
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/PolicyManagement/DelegatedPolicyManagementClient.d.ts +2 -2
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +4 -6
- package/codegen/PolicyManagement/PolicyManagementClient.d.ts +2 -2
- package/codegen/PolicyManagement/PolicyManagementClient.js +4 -6
- package/codegen/PolicyManagement/types.d.ts +6 -31
- package/codegen/datamodel/PolicyManagement/responses.d.ts +8 -8
- package/package.json +1 -1
|
@@ -7,13 +7,13 @@ export declare class DelegatedPolicyManagementClient {
|
|
|
7
7
|
createPolicyInit(request: T.CreatePolicyRequest): Promise<UserActionChallengeResponse>;
|
|
8
8
|
createPolicyComplete(request: T.CreatePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyResponse>;
|
|
9
9
|
getPolicyById(request: T.GetPolicyByIdRequest): Promise<T.GetPolicyByIdResponse>;
|
|
10
|
-
listPolicies(
|
|
10
|
+
listPolicies(): Promise<T.ListPoliciesResponse>;
|
|
11
11
|
archivePolicyInit(request: T.ArchivePolicyRequest): Promise<UserActionChallengeResponse>;
|
|
12
12
|
archivePolicyComplete(request: T.ArchivePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchivePolicyResponse>;
|
|
13
13
|
createPolicyControlInit(request: T.CreatePolicyControlRequest): Promise<UserActionChallengeResponse>;
|
|
14
14
|
createPolicyControlComplete(request: T.CreatePolicyControlRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyControlResponse>;
|
|
15
15
|
getPolicyControlById(request: T.GetPolicyControlByIdRequest): Promise<T.GetPolicyControlByIdResponse>;
|
|
16
|
-
listPolicyControls(
|
|
16
|
+
listPolicyControls(): Promise<T.ListPolicyControlsResponse>;
|
|
17
17
|
archivePolicyControlInit(request: T.ArchivePolicyControlRequest): Promise<UserActionChallengeResponse>;
|
|
18
18
|
archivePolicyControlComplete(request: T.ArchivePolicyControlRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchivePolicyControlResponse>;
|
|
19
19
|
createPolicyRuleInit(request: T.CreatePolicyRuleRequest): Promise<UserActionChallengeResponse>;
|
|
@@ -46,11 +46,10 @@ class DelegatedPolicyManagementClient {
|
|
|
46
46
|
});
|
|
47
47
|
return response.json();
|
|
48
48
|
}
|
|
49
|
-
async listPolicies(
|
|
50
|
-
var _a;
|
|
49
|
+
async listPolicies() {
|
|
51
50
|
const path = (0, url_1.buildPathAndQuery)('/policies', {
|
|
52
51
|
path: {},
|
|
53
|
-
query:
|
|
52
|
+
query: {},
|
|
54
53
|
});
|
|
55
54
|
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
56
55
|
method: 'GET',
|
|
@@ -123,11 +122,10 @@ class DelegatedPolicyManagementClient {
|
|
|
123
122
|
});
|
|
124
123
|
return response.json();
|
|
125
124
|
}
|
|
126
|
-
async listPolicyControls(
|
|
127
|
-
var _a;
|
|
125
|
+
async listPolicyControls() {
|
|
128
126
|
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls', {
|
|
129
127
|
path: {},
|
|
130
|
-
query:
|
|
128
|
+
query: {},
|
|
131
129
|
});
|
|
132
130
|
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
133
131
|
method: 'GET',
|
|
@@ -5,11 +5,11 @@ export declare class PolicyManagementClient {
|
|
|
5
5
|
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
6
|
createPolicy(request: T.CreatePolicyRequest): Promise<T.CreatePolicyResponse>;
|
|
7
7
|
getPolicyById(request: T.GetPolicyByIdRequest): Promise<T.GetPolicyByIdResponse>;
|
|
8
|
-
listPolicies(
|
|
8
|
+
listPolicies(): Promise<T.ListPoliciesResponse>;
|
|
9
9
|
archivePolicy(request: T.ArchivePolicyRequest): Promise<T.ArchivePolicyResponse>;
|
|
10
10
|
createPolicyControl(request: T.CreatePolicyControlRequest): Promise<T.CreatePolicyControlResponse>;
|
|
11
11
|
getPolicyControlById(request: T.GetPolicyControlByIdRequest): Promise<T.GetPolicyControlByIdResponse>;
|
|
12
|
-
listPolicyControls(
|
|
12
|
+
listPolicyControls(): Promise<T.ListPolicyControlsResponse>;
|
|
13
13
|
archivePolicyControl(request: T.ArchivePolicyControlRequest): Promise<T.ArchivePolicyControlResponse>;
|
|
14
14
|
createPolicyRule(request: T.CreatePolicyRuleRequest): Promise<T.CreatePolicyRuleResponse>;
|
|
15
15
|
getPolicyRuleById(request: T.GetPolicyRuleByIdRequest): Promise<T.GetPolicyRuleByIdResponse>;
|
|
@@ -30,11 +30,10 @@ class PolicyManagementClient {
|
|
|
30
30
|
});
|
|
31
31
|
return response.json();
|
|
32
32
|
}
|
|
33
|
-
async listPolicies(
|
|
34
|
-
var _a;
|
|
33
|
+
async listPolicies() {
|
|
35
34
|
const path = (0, url_1.buildPathAndQuery)('/policies', {
|
|
36
35
|
path: {},
|
|
37
|
-
query:
|
|
36
|
+
query: {},
|
|
38
37
|
});
|
|
39
38
|
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
40
39
|
method: 'GET',
|
|
@@ -76,11 +75,10 @@ class PolicyManagementClient {
|
|
|
76
75
|
});
|
|
77
76
|
return response.json();
|
|
78
77
|
}
|
|
79
|
-
async listPolicyControls(
|
|
80
|
-
var _a;
|
|
78
|
+
async listPolicyControls() {
|
|
81
79
|
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls', {
|
|
82
80
|
path: {},
|
|
83
|
-
query:
|
|
81
|
+
query: {},
|
|
84
82
|
});
|
|
85
83
|
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
86
84
|
method: 'GET',
|
|
@@ -7,16 +7,6 @@ export type GetPolicyByIdRequest = {
|
|
|
7
7
|
policyId: string;
|
|
8
8
|
};
|
|
9
9
|
export type GetPolicyByIdResponse = PolicyManagement.Policy;
|
|
10
|
-
export type ListPoliciesRequest = {
|
|
11
|
-
query?: {
|
|
12
|
-
dateCreated?: string;
|
|
13
|
-
dateUpdated?: string;
|
|
14
|
-
activityKind?: PolicyManagement.PolicyActivityKind;
|
|
15
|
-
isEnabled?: boolean;
|
|
16
|
-
isDisabled?: boolean;
|
|
17
|
-
isArchived?: boolean;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
10
|
export type ListPoliciesResponse = {
|
|
21
11
|
items: PolicyManagement.Policy[];
|
|
22
12
|
};
|
|
@@ -32,16 +22,6 @@ export type GetPolicyControlByIdRequest = {
|
|
|
32
22
|
policyControlId: string;
|
|
33
23
|
};
|
|
34
24
|
export type GetPolicyControlByIdResponse = PolicyManagement.PolicyControl;
|
|
35
|
-
export type ListPolicyControlsRequest = {
|
|
36
|
-
query?: {
|
|
37
|
-
dateCreated?: string;
|
|
38
|
-
dateUpdated?: string;
|
|
39
|
-
policyControlKind?: PolicyManagement.PolicyControlKind;
|
|
40
|
-
isEnabled?: boolean;
|
|
41
|
-
isDisabled?: boolean;
|
|
42
|
-
isArchived?: boolean;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
25
|
export type ListPolicyControlsResponse = {
|
|
46
26
|
items: PolicyManagement.PolicyControl[];
|
|
47
27
|
};
|
|
@@ -50,27 +30,22 @@ export type ArchivePolicyControlRequest = {
|
|
|
50
30
|
};
|
|
51
31
|
export type ArchivePolicyControlResponse = PolicyManagement.PolicyControl;
|
|
52
32
|
export type CreatePolicyRuleRequest = {
|
|
53
|
-
body: PolicyManagement.
|
|
33
|
+
body: PolicyManagement.CreatePolicyRuleInput;
|
|
54
34
|
};
|
|
55
|
-
export type CreatePolicyRuleResponse = PolicyManagement.
|
|
35
|
+
export type CreatePolicyRuleResponse = PolicyManagement.PolicyRule;
|
|
56
36
|
export type GetPolicyRuleByIdRequest = {
|
|
57
37
|
policyRuleId: string;
|
|
58
38
|
};
|
|
59
|
-
export type GetPolicyRuleByIdResponse = PolicyManagement.
|
|
39
|
+
export type GetPolicyRuleByIdResponse = PolicyManagement.PolicyRule;
|
|
60
40
|
export type ListPolicyRulesRequest = {
|
|
61
41
|
query?: {
|
|
62
|
-
|
|
63
|
-
dateUpdated?: string;
|
|
64
|
-
activityKind?: PolicyManagement.PolicyActivityKind;
|
|
65
|
-
isEnabled?: boolean;
|
|
66
|
-
isDisabled?: boolean;
|
|
67
|
-
isArchived?: boolean;
|
|
42
|
+
author?: string;
|
|
68
43
|
};
|
|
69
44
|
};
|
|
70
45
|
export type ListPolicyRulesResponse = {
|
|
71
|
-
items: PolicyManagement.
|
|
46
|
+
items: PolicyManagement.PolicyRule[];
|
|
72
47
|
};
|
|
73
48
|
export type ArchivePolicyRuleRequest = {
|
|
74
49
|
policyRuleId: string;
|
|
75
50
|
};
|
|
76
|
-
export type ArchivePolicyRuleResponse = PolicyManagement.
|
|
51
|
+
export type ArchivePolicyRuleResponse = PolicyManagement.PolicyRule;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BadRequestError, EntityNotFoundError, ForbiddenError, UnauthorizedError } from '../Foundations';
|
|
2
|
-
import { Policy, PolicyControl } from './types';
|
|
2
|
+
import { Policy, PolicyControl, PolicyRule } from './types';
|
|
3
3
|
export type CreatePolicySuccess = Policy;
|
|
4
4
|
export type CreatePolicyError = {
|
|
5
5
|
error: BadRequestError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
@@ -54,29 +54,29 @@ export type ArchivePolicyControlError = {
|
|
|
54
54
|
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
55
55
|
};
|
|
56
56
|
export type ArchivePolicyControlResponse = ArchivePolicyControlSuccess | ArchivePolicyControlError;
|
|
57
|
-
export type CreatePolicyRuleSuccess =
|
|
57
|
+
export type CreatePolicyRuleSuccess = PolicyRule;
|
|
58
58
|
export type CreatePolicyRuleError = {
|
|
59
59
|
error: BadRequestError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
60
60
|
};
|
|
61
61
|
export type CreatePolicyRuleResponse = CreatePolicyRuleSuccess | CreatePolicyRuleError;
|
|
62
|
-
export type UpdatePolicyRuleSuccess =
|
|
62
|
+
export type UpdatePolicyRuleSuccess = PolicyRule;
|
|
63
63
|
export type UpdatePolicyRuleError = {
|
|
64
|
-
error:
|
|
64
|
+
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
65
65
|
};
|
|
66
66
|
export type UpdatePolicyRuleResponse = UpdatePolicyRuleSuccess | UpdatePolicyRuleError;
|
|
67
|
-
export type GetPolicyRuleByIdSuccess =
|
|
67
|
+
export type GetPolicyRuleByIdSuccess = PolicyRule;
|
|
68
68
|
export type GetPolicyRuleByIdError = {
|
|
69
|
-
error:
|
|
69
|
+
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
70
70
|
};
|
|
71
71
|
export type GetPolicyRuleByIdResponse = GetPolicyRuleByIdSuccess | GetPolicyRuleByIdError;
|
|
72
72
|
export type ListPolicyRulesSuccess = {
|
|
73
|
-
items:
|
|
73
|
+
items: PolicyRule[];
|
|
74
74
|
};
|
|
75
75
|
export type ListPolicyRulesError = {
|
|
76
76
|
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
77
77
|
};
|
|
78
78
|
export type ListPolicyRulesResponse = ListPolicyRulesSuccess | ListPolicyRulesError;
|
|
79
|
-
export type ArchivePolicyRuleSuccess =
|
|
79
|
+
export type ArchivePolicyRuleSuccess = PolicyRule;
|
|
80
80
|
export type ArchivePolicyRuleError = {
|
|
81
81
|
error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
82
82
|
};
|