@dfns/sdk 0.1.0-alpha.2 → 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/Assets/AssetsClient.d.ts +0 -1
- package/codegen/Assets/AssetsClient.js +0 -11
- package/codegen/Assets/DelegatedAssetsClient.d.ts +0 -2
- package/codegen/Assets/DelegatedAssetsClient.js +0 -27
- package/codegen/Assets/types.d.ts +3 -5
- package/codegen/Auth/AuthClient.d.ts +0 -14
- package/codegen/Auth/AuthClient.js +0 -173
- package/codegen/Auth/DelegatedAuthClient.d.ts +0 -24
- package/codegen/Auth/DelegatedAuthClient.js +0 -341
- package/codegen/Auth/types.d.ts +0 -74
- package/codegen/Permissions/DelegatedPermissionsClient.d.ts +0 -1
- package/codegen/Permissions/DelegatedPermissionsClient.js +0 -12
- package/codegen/Permissions/PermissionsClient.d.ts +0 -1
- package/codegen/Permissions/PermissionsClient.js +0 -12
- package/codegen/Permissions/types.d.ts +0 -8
- package/codegen/PolicyExecution/types.d.ts +3 -1
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +2 -8
- package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +4 -87
- package/codegen/PolicyManagement/PolicyManagementClient.d.ts +2 -5
- package/codegen/PolicyManagement/PolicyManagementClient.js +4 -42
- package/codegen/PolicyManagement/types.d.ts +6 -46
- package/codegen/datamodel/Assets/responses.d.ts +3 -1
- package/codegen/datamodel/Foundations/types.d.ts +3 -1
- package/codegen/datamodel/Foundations/types.js +12 -0
- package/codegen/datamodel/PolicyExecution/responses.d.ts +3 -1
- package/codegen/datamodel/PolicyManagement/responses.d.ts +8 -8
- package/package.json +1 -1
|
@@ -552,190 +552,6 @@ class DelegatedAuthClient {
|
|
|
552
552
|
});
|
|
553
553
|
return response.json();
|
|
554
554
|
}
|
|
555
|
-
async listServiceAccountTokens(request) {
|
|
556
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens', {
|
|
557
|
-
path: { serviceAccountId: request.serviceAccountId },
|
|
558
|
-
query: {},
|
|
559
|
-
});
|
|
560
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
561
|
-
method: 'GET',
|
|
562
|
-
apiOptions: this.apiOptions,
|
|
563
|
-
});
|
|
564
|
-
return response.json();
|
|
565
|
-
}
|
|
566
|
-
async createServiceAccountTokenInit(request) {
|
|
567
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
|
|
568
|
-
path: { serviceAccountId: request.serviceAccountId },
|
|
569
|
-
query: {},
|
|
570
|
-
});
|
|
571
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
572
|
-
userActionHttpMethod: 'POST',
|
|
573
|
-
userActionHttpPath: path,
|
|
574
|
-
userActionPayload: JSON.stringify(request.body),
|
|
575
|
-
userActionServerKind: 'Api',
|
|
576
|
-
}, this.apiOptions);
|
|
577
|
-
return challenge;
|
|
578
|
-
}
|
|
579
|
-
async createServiceAccountTokenComplete(request, signedChallenge) {
|
|
580
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
|
|
581
|
-
path: { serviceAccountId: request.serviceAccountId },
|
|
582
|
-
query: {},
|
|
583
|
-
});
|
|
584
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
585
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
586
|
-
method: 'POST',
|
|
587
|
-
body: request.body,
|
|
588
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
589
|
-
apiOptions: this.apiOptions,
|
|
590
|
-
});
|
|
591
|
-
return response.json();
|
|
592
|
-
}
|
|
593
|
-
async getServiceAccountToken(request) {
|
|
594
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', {
|
|
595
|
-
path: {
|
|
596
|
-
serviceAccountId: request.serviceAccountId,
|
|
597
|
-
tokenId: request.tokenId,
|
|
598
|
-
},
|
|
599
|
-
query: {},
|
|
600
|
-
});
|
|
601
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
602
|
-
method: 'GET',
|
|
603
|
-
apiOptions: this.apiOptions,
|
|
604
|
-
});
|
|
605
|
-
return response.json();
|
|
606
|
-
}
|
|
607
|
-
async updateServiceAccountTokenInit(request) {
|
|
608
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', {
|
|
609
|
-
path: {
|
|
610
|
-
serviceAccountId: request.serviceAccountId,
|
|
611
|
-
tokenId: request.tokenId,
|
|
612
|
-
},
|
|
613
|
-
query: {},
|
|
614
|
-
});
|
|
615
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
616
|
-
userActionHttpMethod: 'PUT',
|
|
617
|
-
userActionHttpPath: path,
|
|
618
|
-
userActionPayload: JSON.stringify(request.body),
|
|
619
|
-
userActionServerKind: 'Api',
|
|
620
|
-
}, this.apiOptions);
|
|
621
|
-
return challenge;
|
|
622
|
-
}
|
|
623
|
-
async updateServiceAccountTokenComplete(request, signedChallenge) {
|
|
624
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', {
|
|
625
|
-
path: {
|
|
626
|
-
serviceAccountId: request.serviceAccountId,
|
|
627
|
-
tokenId: request.tokenId,
|
|
628
|
-
},
|
|
629
|
-
query: {},
|
|
630
|
-
});
|
|
631
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
632
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
633
|
-
method: 'PUT',
|
|
634
|
-
body: request.body,
|
|
635
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
636
|
-
apiOptions: this.apiOptions,
|
|
637
|
-
});
|
|
638
|
-
return response.json();
|
|
639
|
-
}
|
|
640
|
-
async archiveServiceAccountTokenInit(request) {
|
|
641
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', {
|
|
642
|
-
path: {
|
|
643
|
-
serviceAccountId: request.serviceAccountId,
|
|
644
|
-
tokenId: request.tokenId,
|
|
645
|
-
},
|
|
646
|
-
query: {},
|
|
647
|
-
});
|
|
648
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
649
|
-
userActionHttpMethod: 'DELETE',
|
|
650
|
-
userActionHttpPath: path,
|
|
651
|
-
userActionPayload: JSON.stringify({}),
|
|
652
|
-
userActionServerKind: 'Api',
|
|
653
|
-
}, this.apiOptions);
|
|
654
|
-
return challenge;
|
|
655
|
-
}
|
|
656
|
-
async archiveServiceAccountTokenComplete(request, signedChallenge) {
|
|
657
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', {
|
|
658
|
-
path: {
|
|
659
|
-
serviceAccountId: request.serviceAccountId,
|
|
660
|
-
tokenId: request.tokenId,
|
|
661
|
-
},
|
|
662
|
-
query: {},
|
|
663
|
-
});
|
|
664
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
665
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
666
|
-
method: 'DELETE',
|
|
667
|
-
body: {},
|
|
668
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
669
|
-
apiOptions: this.apiOptions,
|
|
670
|
-
});
|
|
671
|
-
return response.json();
|
|
672
|
-
}
|
|
673
|
-
async activateServiceAccountTokenInit(request) {
|
|
674
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/activate', {
|
|
675
|
-
path: {
|
|
676
|
-
serviceAccountId: request.serviceAccountId,
|
|
677
|
-
tokenId: request.tokenId,
|
|
678
|
-
},
|
|
679
|
-
query: {},
|
|
680
|
-
});
|
|
681
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
682
|
-
userActionHttpMethod: 'PUT',
|
|
683
|
-
userActionHttpPath: path,
|
|
684
|
-
userActionPayload: JSON.stringify({}),
|
|
685
|
-
userActionServerKind: 'Api',
|
|
686
|
-
}, this.apiOptions);
|
|
687
|
-
return challenge;
|
|
688
|
-
}
|
|
689
|
-
async activateServiceAccountTokenComplete(request, signedChallenge) {
|
|
690
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/activate', {
|
|
691
|
-
path: {
|
|
692
|
-
serviceAccountId: request.serviceAccountId,
|
|
693
|
-
tokenId: request.tokenId,
|
|
694
|
-
},
|
|
695
|
-
query: {},
|
|
696
|
-
});
|
|
697
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
698
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
699
|
-
method: 'PUT',
|
|
700
|
-
body: {},
|
|
701
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
702
|
-
apiOptions: this.apiOptions,
|
|
703
|
-
});
|
|
704
|
-
return response.json();
|
|
705
|
-
}
|
|
706
|
-
async deactivateServiceAccountTokenInit(request) {
|
|
707
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/deactivate', {
|
|
708
|
-
path: {
|
|
709
|
-
serviceAccountId: request.serviceAccountId,
|
|
710
|
-
tokenId: request.tokenId,
|
|
711
|
-
},
|
|
712
|
-
query: {},
|
|
713
|
-
});
|
|
714
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
715
|
-
userActionHttpMethod: 'PUT',
|
|
716
|
-
userActionHttpPath: path,
|
|
717
|
-
userActionPayload: JSON.stringify({}),
|
|
718
|
-
userActionServerKind: 'Api',
|
|
719
|
-
}, this.apiOptions);
|
|
720
|
-
return challenge;
|
|
721
|
-
}
|
|
722
|
-
async deactivateServiceAccountTokenComplete(request, signedChallenge) {
|
|
723
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/deactivate', {
|
|
724
|
-
path: {
|
|
725
|
-
serviceAccountId: request.serviceAccountId,
|
|
726
|
-
tokenId: request.tokenId,
|
|
727
|
-
},
|
|
728
|
-
query: {},
|
|
729
|
-
});
|
|
730
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
731
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
732
|
-
method: 'PUT',
|
|
733
|
-
body: {},
|
|
734
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
735
|
-
apiOptions: this.apiOptions,
|
|
736
|
-
});
|
|
737
|
-
return response.json();
|
|
738
|
-
}
|
|
739
555
|
async listUsers() {
|
|
740
556
|
const path = (0, url_1.buildPathAndQuery)('/auth/users', {
|
|
741
557
|
path: {},
|
|
@@ -1050,163 +866,6 @@ class DelegatedAuthClient {
|
|
|
1050
866
|
});
|
|
1051
867
|
return response.json();
|
|
1052
868
|
}
|
|
1053
|
-
async listApplicationTokens(request) {
|
|
1054
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens', {
|
|
1055
|
-
path: { appId: request.appId },
|
|
1056
|
-
query: {},
|
|
1057
|
-
});
|
|
1058
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
1059
|
-
method: 'GET',
|
|
1060
|
-
apiOptions: this.apiOptions,
|
|
1061
|
-
});
|
|
1062
|
-
return response.json();
|
|
1063
|
-
}
|
|
1064
|
-
async createApplicationTokenInit(request) {
|
|
1065
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens', {
|
|
1066
|
-
path: { appId: request.appId },
|
|
1067
|
-
query: {},
|
|
1068
|
-
});
|
|
1069
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
1070
|
-
userActionHttpMethod: 'POST',
|
|
1071
|
-
userActionHttpPath: path,
|
|
1072
|
-
userActionPayload: JSON.stringify(request.body),
|
|
1073
|
-
userActionServerKind: 'Api',
|
|
1074
|
-
}, this.apiOptions);
|
|
1075
|
-
return challenge;
|
|
1076
|
-
}
|
|
1077
|
-
async createApplicationTokenComplete(request, signedChallenge) {
|
|
1078
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens', {
|
|
1079
|
-
path: { appId: request.appId },
|
|
1080
|
-
query: {},
|
|
1081
|
-
});
|
|
1082
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
1083
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
1084
|
-
method: 'POST',
|
|
1085
|
-
body: request.body,
|
|
1086
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
1087
|
-
apiOptions: this.apiOptions,
|
|
1088
|
-
});
|
|
1089
|
-
return response.json();
|
|
1090
|
-
}
|
|
1091
|
-
async getApplicationToken(request) {
|
|
1092
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens/:tokenId', {
|
|
1093
|
-
path: { appId: request.appId, tokenId: request.tokenId },
|
|
1094
|
-
query: {},
|
|
1095
|
-
});
|
|
1096
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
1097
|
-
method: 'GET',
|
|
1098
|
-
apiOptions: this.apiOptions,
|
|
1099
|
-
});
|
|
1100
|
-
return response.json();
|
|
1101
|
-
}
|
|
1102
|
-
async updateApplicationTokenInit(request) {
|
|
1103
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens/:tokenId', {
|
|
1104
|
-
path: { appId: request.appId, tokenId: request.tokenId },
|
|
1105
|
-
query: {},
|
|
1106
|
-
});
|
|
1107
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
1108
|
-
userActionHttpMethod: 'PUT',
|
|
1109
|
-
userActionHttpPath: path,
|
|
1110
|
-
userActionPayload: JSON.stringify(request.body),
|
|
1111
|
-
userActionServerKind: 'Api',
|
|
1112
|
-
}, this.apiOptions);
|
|
1113
|
-
return challenge;
|
|
1114
|
-
}
|
|
1115
|
-
async updateApplicationTokenComplete(request, signedChallenge) {
|
|
1116
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens/:tokenId', {
|
|
1117
|
-
path: { appId: request.appId, tokenId: request.tokenId },
|
|
1118
|
-
query: {},
|
|
1119
|
-
});
|
|
1120
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
1121
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
1122
|
-
method: 'PUT',
|
|
1123
|
-
body: request.body,
|
|
1124
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
1125
|
-
apiOptions: this.apiOptions,
|
|
1126
|
-
});
|
|
1127
|
-
return response.json();
|
|
1128
|
-
}
|
|
1129
|
-
async archiveApplicationTokenInit(request) {
|
|
1130
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId', {
|
|
1131
|
-
path: { appId: request.appId, tokenId: request.tokenId },
|
|
1132
|
-
query: {},
|
|
1133
|
-
});
|
|
1134
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
1135
|
-
userActionHttpMethod: 'DELETE',
|
|
1136
|
-
userActionHttpPath: path,
|
|
1137
|
-
userActionPayload: JSON.stringify({}),
|
|
1138
|
-
userActionServerKind: 'Api',
|
|
1139
|
-
}, this.apiOptions);
|
|
1140
|
-
return challenge;
|
|
1141
|
-
}
|
|
1142
|
-
async archiveApplicationTokenComplete(request, signedChallenge) {
|
|
1143
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId', {
|
|
1144
|
-
path: { appId: request.appId, tokenId: request.tokenId },
|
|
1145
|
-
query: {},
|
|
1146
|
-
});
|
|
1147
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
1148
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
1149
|
-
method: 'DELETE',
|
|
1150
|
-
body: {},
|
|
1151
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
1152
|
-
apiOptions: this.apiOptions,
|
|
1153
|
-
});
|
|
1154
|
-
return response.json();
|
|
1155
|
-
}
|
|
1156
|
-
async activateApplicationTokenInit(request) {
|
|
1157
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/activate', {
|
|
1158
|
-
path: { appId: request.appId, tokenId: request.tokenId },
|
|
1159
|
-
query: {},
|
|
1160
|
-
});
|
|
1161
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
1162
|
-
userActionHttpMethod: 'PUT',
|
|
1163
|
-
userActionHttpPath: path,
|
|
1164
|
-
userActionPayload: JSON.stringify({}),
|
|
1165
|
-
userActionServerKind: 'Api',
|
|
1166
|
-
}, this.apiOptions);
|
|
1167
|
-
return challenge;
|
|
1168
|
-
}
|
|
1169
|
-
async activateApplicationTokenComplete(request, signedChallenge) {
|
|
1170
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/activate', {
|
|
1171
|
-
path: { appId: request.appId, tokenId: request.tokenId },
|
|
1172
|
-
query: {},
|
|
1173
|
-
});
|
|
1174
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
1175
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
1176
|
-
method: 'PUT',
|
|
1177
|
-
body: {},
|
|
1178
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
1179
|
-
apiOptions: this.apiOptions,
|
|
1180
|
-
});
|
|
1181
|
-
return response.json();
|
|
1182
|
-
}
|
|
1183
|
-
async deactivateApplicationTokenInit(request) {
|
|
1184
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/deactivate', {
|
|
1185
|
-
path: { appId: request.appId, tokenId: request.tokenId },
|
|
1186
|
-
query: {},
|
|
1187
|
-
});
|
|
1188
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
1189
|
-
userActionHttpMethod: 'PUT',
|
|
1190
|
-
userActionHttpPath: path,
|
|
1191
|
-
userActionPayload: JSON.stringify({}),
|
|
1192
|
-
userActionServerKind: 'Api',
|
|
1193
|
-
}, this.apiOptions);
|
|
1194
|
-
return challenge;
|
|
1195
|
-
}
|
|
1196
|
-
async deactivateApplicationTokenComplete(request, signedChallenge) {
|
|
1197
|
-
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/deactivate', {
|
|
1198
|
-
path: { appId: request.appId, tokenId: request.tokenId },
|
|
1199
|
-
query: {},
|
|
1200
|
-
});
|
|
1201
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
1202
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
1203
|
-
method: 'PUT',
|
|
1204
|
-
body: {},
|
|
1205
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
1206
|
-
apiOptions: this.apiOptions,
|
|
1207
|
-
});
|
|
1208
|
-
return response.json();
|
|
1209
|
-
}
|
|
1210
869
|
async createUserRecovery(request) {
|
|
1211
870
|
const path = (0, url_1.buildPathAndQuery)('/auth/recover/user', {
|
|
1212
871
|
path: {},
|
package/codegen/Auth/types.d.ts
CHANGED
|
@@ -107,43 +107,6 @@ export type DeactivateServiceAccountRequest = {
|
|
|
107
107
|
serviceAccountId: Foundations.EntityId;
|
|
108
108
|
};
|
|
109
109
|
export type DeactivateServiceAccountResponse = Auth.UserAccessTokenInformation;
|
|
110
|
-
export type ListServiceAccountTokensRequest = {
|
|
111
|
-
serviceAccountId: Foundations.EntityId;
|
|
112
|
-
};
|
|
113
|
-
export type ListServiceAccountTokensResponse = {
|
|
114
|
-
items: Auth.AccessTokenInfoWithPublicKey[];
|
|
115
|
-
};
|
|
116
|
-
export type CreateServiceAccountTokenRequest = {
|
|
117
|
-
serviceAccountId: Foundations.EntityId;
|
|
118
|
-
body: Auth.CreateAccessTokenInput;
|
|
119
|
-
};
|
|
120
|
-
export type CreateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
121
|
-
export type GetServiceAccountTokenRequest = {
|
|
122
|
-
serviceAccountId: Foundations.EntityId;
|
|
123
|
-
tokenId: Foundations.EntityId;
|
|
124
|
-
};
|
|
125
|
-
export type GetServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
126
|
-
export type UpdateServiceAccountTokenRequest = {
|
|
127
|
-
serviceAccountId: Foundations.EntityId;
|
|
128
|
-
tokenId: Foundations.EntityId;
|
|
129
|
-
body: Auth.UpdateAccessTokenInput;
|
|
130
|
-
};
|
|
131
|
-
export type UpdateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
132
|
-
export type ArchiveServiceAccountTokenRequest = {
|
|
133
|
-
serviceAccountId: Foundations.EntityId;
|
|
134
|
-
tokenId: Foundations.EntityId;
|
|
135
|
-
};
|
|
136
|
-
export type ArchiveServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
137
|
-
export type ActivateServiceAccountTokenRequest = {
|
|
138
|
-
serviceAccountId: Foundations.EntityId;
|
|
139
|
-
tokenId: Foundations.EntityId;
|
|
140
|
-
};
|
|
141
|
-
export type ActivateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
142
|
-
export type DeactivateServiceAccountTokenRequest = {
|
|
143
|
-
serviceAccountId: Foundations.EntityId;
|
|
144
|
-
tokenId: Foundations.EntityId;
|
|
145
|
-
};
|
|
146
|
-
export type DeactivateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
147
110
|
export type ListUsersResponse = {
|
|
148
111
|
items: Auth.UserInfo[];
|
|
149
112
|
};
|
|
@@ -200,43 +163,6 @@ export type DeactivateApplicationRequest = {
|
|
|
200
163
|
appId: Foundations.EntityId;
|
|
201
164
|
};
|
|
202
165
|
export type DeactivateApplicationResponse = Auth.AppInfoWithPublicKey;
|
|
203
|
-
export type ListApplicationTokensRequest = {
|
|
204
|
-
appId: Foundations.EntityId;
|
|
205
|
-
};
|
|
206
|
-
export type ListApplicationTokensResponse = {
|
|
207
|
-
items: Auth.AccessTokenInfoWithPublicKey[];
|
|
208
|
-
};
|
|
209
|
-
export type CreateApplicationTokenRequest = {
|
|
210
|
-
appId: Foundations.EntityId;
|
|
211
|
-
body: Auth.CreateAccessTokenInput;
|
|
212
|
-
};
|
|
213
|
-
export type CreateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
214
|
-
export type GetApplicationTokenRequest = {
|
|
215
|
-
appId: Foundations.EntityId;
|
|
216
|
-
tokenId: Foundations.EntityId;
|
|
217
|
-
};
|
|
218
|
-
export type GetApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
219
|
-
export type UpdateApplicationTokenRequest = {
|
|
220
|
-
appId: Foundations.EntityId;
|
|
221
|
-
tokenId: Foundations.EntityId;
|
|
222
|
-
body: Auth.UpdateAccessTokenInput;
|
|
223
|
-
};
|
|
224
|
-
export type UpdateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
225
|
-
export type ArchiveApplicationTokenRequest = {
|
|
226
|
-
appId: Foundations.EntityId;
|
|
227
|
-
tokenId: Foundations.EntityId;
|
|
228
|
-
};
|
|
229
|
-
export type ArchiveApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
230
|
-
export type ActivateApplicationTokenRequest = {
|
|
231
|
-
appId: Foundations.EntityId;
|
|
232
|
-
tokenId: Foundations.EntityId;
|
|
233
|
-
};
|
|
234
|
-
export type ActivateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
235
|
-
export type DeactivateApplicationTokenRequest = {
|
|
236
|
-
appId: Foundations.EntityId;
|
|
237
|
-
tokenId: Foundations.EntityId;
|
|
238
|
-
};
|
|
239
|
-
export type DeactivateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey;
|
|
240
166
|
export type CreateUserRecoveryRequest = {
|
|
241
167
|
body: Auth.CreateUserLoginChallengeInput;
|
|
242
168
|
};
|
|
@@ -24,5 +24,4 @@ export declare class DelegatedPermissionsClient {
|
|
|
24
24
|
revokePermissionAssignmentInit(request: T.RevokePermissionAssignmentRequest): Promise<UserActionChallengeResponse>;
|
|
25
25
|
revokePermissionAssignmentComplete(request: T.RevokePermissionAssignmentRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.RevokePermissionAssignmentResponse>;
|
|
26
26
|
listPermissionAssignments(request: T.ListPermissionAssignmentsRequest): Promise<T.ListPermissionAssignmentsResponse>;
|
|
27
|
-
listPermissionsHistorical(request: T.ListPermissionsHistoricalRequest): Promise<T.ListPermissionsHistoricalResponse>;
|
|
28
27
|
}
|
|
@@ -281,17 +281,5 @@ class DelegatedPermissionsClient {
|
|
|
281
281
|
});
|
|
282
282
|
return response.json();
|
|
283
283
|
}
|
|
284
|
-
async listPermissionsHistorical(request) {
|
|
285
|
-
var _a;
|
|
286
|
-
const path = (0, url_1.buildPathAndQuery)('/audit/permissions', {
|
|
287
|
-
path: {},
|
|
288
|
-
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
289
|
-
});
|
|
290
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
291
|
-
method: 'GET',
|
|
292
|
-
apiOptions: this.apiOptions,
|
|
293
|
-
});
|
|
294
|
-
return response.json();
|
|
295
|
-
}
|
|
296
284
|
}
|
|
297
285
|
exports.DelegatedPermissionsClient = DelegatedPermissionsClient;
|
|
@@ -15,5 +15,4 @@ export declare class PermissionsClient {
|
|
|
15
15
|
createPermissionAssignment(request: T.CreatePermissionAssignmentRequest): Promise<T.CreatePermissionAssignmentResponse>;
|
|
16
16
|
revokePermissionAssignment(request: T.RevokePermissionAssignmentRequest): Promise<T.RevokePermissionAssignmentResponse>;
|
|
17
17
|
listPermissionAssignments(request: T.ListPermissionAssignmentsRequest): Promise<T.ListPermissionAssignmentsResponse>;
|
|
18
|
-
listPermissionsHistorical(request: T.ListPermissionsHistoricalRequest): Promise<T.ListPermissionsHistoricalResponse>;
|
|
19
18
|
}
|
|
@@ -153,17 +153,5 @@ class PermissionsClient {
|
|
|
153
153
|
});
|
|
154
154
|
return response.json();
|
|
155
155
|
}
|
|
156
|
-
async listPermissionsHistorical(request) {
|
|
157
|
-
var _a;
|
|
158
|
-
const path = (0, url_1.buildPathAndQuery)('/audit/permissions', {
|
|
159
|
-
path: {},
|
|
160
|
-
query: (_a = request.query) !== null && _a !== void 0 ? _a : {},
|
|
161
|
-
});
|
|
162
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
163
|
-
method: 'GET',
|
|
164
|
-
apiOptions: this.apiOptions,
|
|
165
|
-
});
|
|
166
|
-
return response.json();
|
|
167
|
-
}
|
|
168
156
|
}
|
|
169
157
|
exports.PermissionsClient = PermissionsClient;
|
|
@@ -61,11 +61,3 @@ export type ListPermissionAssignmentsRequest = {
|
|
|
61
61
|
export type ListPermissionAssignmentsResponse = {
|
|
62
62
|
items: Permissions.PermissionAssignment[];
|
|
63
63
|
};
|
|
64
|
-
export type ListPermissionsHistoricalRequest = {
|
|
65
|
-
query?: {
|
|
66
|
-
permissionName?: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
export type ListPermissionsHistoricalResponse = {
|
|
70
|
-
items: Permissions.Permission[];
|
|
71
|
-
};
|
|
@@ -4,7 +4,9 @@ export type ListPolicyControlExecutionsRequest = {
|
|
|
4
4
|
activityId: string;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
|
-
export type ListPolicyControlExecutionsResponse =
|
|
7
|
+
export type ListPolicyControlExecutionsResponse = {
|
|
8
|
+
items: PolicyExecution.PolicyControlExecution[];
|
|
9
|
+
};
|
|
8
10
|
export type GetPolicyControlExecutionByIdRequest = {
|
|
9
11
|
policyControlExecutionId: string;
|
|
10
12
|
};
|
|
@@ -6,24 +6,18 @@ export declare class DelegatedPolicyManagementClient {
|
|
|
6
6
|
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
7
7
|
createPolicyInit(request: T.CreatePolicyRequest): Promise<UserActionChallengeResponse>;
|
|
8
8
|
createPolicyComplete(request: T.CreatePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyResponse>;
|
|
9
|
-
updatePolicyInit(request: T.UpdatePolicyRequest): Promise<UserActionChallengeResponse>;
|
|
10
|
-
updatePolicyComplete(request: T.UpdatePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdatePolicyResponse>;
|
|
11
9
|
getPolicyById(request: T.GetPolicyByIdRequest): Promise<T.GetPolicyByIdResponse>;
|
|
12
|
-
listPolicies(
|
|
10
|
+
listPolicies(): Promise<T.ListPoliciesResponse>;
|
|
13
11
|
archivePolicyInit(request: T.ArchivePolicyRequest): Promise<UserActionChallengeResponse>;
|
|
14
12
|
archivePolicyComplete(request: T.ArchivePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchivePolicyResponse>;
|
|
15
13
|
createPolicyControlInit(request: T.CreatePolicyControlRequest): Promise<UserActionChallengeResponse>;
|
|
16
14
|
createPolicyControlComplete(request: T.CreatePolicyControlRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyControlResponse>;
|
|
17
|
-
updatePolicyControlInit(request: T.UpdatePolicyControlRequest): Promise<UserActionChallengeResponse>;
|
|
18
|
-
updatePolicyControlComplete(request: T.UpdatePolicyControlRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdatePolicyControlResponse>;
|
|
19
15
|
getPolicyControlById(request: T.GetPolicyControlByIdRequest): Promise<T.GetPolicyControlByIdResponse>;
|
|
20
|
-
listPolicyControls(
|
|
16
|
+
listPolicyControls(): Promise<T.ListPolicyControlsResponse>;
|
|
21
17
|
archivePolicyControlInit(request: T.ArchivePolicyControlRequest): Promise<UserActionChallengeResponse>;
|
|
22
18
|
archivePolicyControlComplete(request: T.ArchivePolicyControlRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchivePolicyControlResponse>;
|
|
23
19
|
createPolicyRuleInit(request: T.CreatePolicyRuleRequest): Promise<UserActionChallengeResponse>;
|
|
24
20
|
createPolicyRuleComplete(request: T.CreatePolicyRuleRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyRuleResponse>;
|
|
25
|
-
updatePolicyRuleInit(request: T.UpdatePolicyRuleRequest): Promise<UserActionChallengeResponse>;
|
|
26
|
-
updatePolicyRuleComplete(request: T.UpdatePolicyRuleRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdatePolicyRuleResponse>;
|
|
27
21
|
getPolicyRuleById(request: T.GetPolicyRuleByIdRequest): Promise<T.GetPolicyRuleByIdResponse>;
|
|
28
22
|
listPolicyRules(request: T.ListPolicyRulesRequest): Promise<T.ListPolicyRulesResponse>;
|
|
29
23
|
archivePolicyRuleInit(request: T.ArchivePolicyRuleRequest): Promise<UserActionChallengeResponse>;
|
|
@@ -35,33 +35,6 @@ class DelegatedPolicyManagementClient {
|
|
|
35
35
|
});
|
|
36
36
|
return response.json();
|
|
37
37
|
}
|
|
38
|
-
async updatePolicyInit(request) {
|
|
39
|
-
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', {
|
|
40
|
-
path: { policyId: request.policyId },
|
|
41
|
-
query: {},
|
|
42
|
-
});
|
|
43
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
44
|
-
userActionHttpMethod: 'PUT',
|
|
45
|
-
userActionHttpPath: path,
|
|
46
|
-
userActionPayload: JSON.stringify(request.body),
|
|
47
|
-
userActionServerKind: 'Api',
|
|
48
|
-
}, this.apiOptions);
|
|
49
|
-
return challenge;
|
|
50
|
-
}
|
|
51
|
-
async updatePolicyComplete(request, signedChallenge) {
|
|
52
|
-
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', {
|
|
53
|
-
path: { policyId: request.policyId },
|
|
54
|
-
query: {},
|
|
55
|
-
});
|
|
56
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
57
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
58
|
-
method: 'PUT',
|
|
59
|
-
body: request.body,
|
|
60
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
61
|
-
apiOptions: this.apiOptions,
|
|
62
|
-
});
|
|
63
|
-
return response.json();
|
|
64
|
-
}
|
|
65
38
|
async getPolicyById(request) {
|
|
66
39
|
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', {
|
|
67
40
|
path: { policyId: request.policyId },
|
|
@@ -73,11 +46,10 @@ class DelegatedPolicyManagementClient {
|
|
|
73
46
|
});
|
|
74
47
|
return response.json();
|
|
75
48
|
}
|
|
76
|
-
async listPolicies(
|
|
77
|
-
var _a;
|
|
49
|
+
async listPolicies() {
|
|
78
50
|
const path = (0, url_1.buildPathAndQuery)('/policies', {
|
|
79
51
|
path: {},
|
|
80
|
-
query:
|
|
52
|
+
query: {},
|
|
81
53
|
});
|
|
82
54
|
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
83
55
|
method: 'GET',
|
|
@@ -139,33 +111,6 @@ class DelegatedPolicyManagementClient {
|
|
|
139
111
|
});
|
|
140
112
|
return response.json();
|
|
141
113
|
}
|
|
142
|
-
async updatePolicyControlInit(request) {
|
|
143
|
-
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', {
|
|
144
|
-
path: { policyControlId: request.policyControlId },
|
|
145
|
-
query: {},
|
|
146
|
-
});
|
|
147
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
148
|
-
userActionHttpMethod: 'PUT',
|
|
149
|
-
userActionHttpPath: path,
|
|
150
|
-
userActionPayload: JSON.stringify(request.body),
|
|
151
|
-
userActionServerKind: 'Api',
|
|
152
|
-
}, this.apiOptions);
|
|
153
|
-
return challenge;
|
|
154
|
-
}
|
|
155
|
-
async updatePolicyControlComplete(request, signedChallenge) {
|
|
156
|
-
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', {
|
|
157
|
-
path: { policyControlId: request.policyControlId },
|
|
158
|
-
query: {},
|
|
159
|
-
});
|
|
160
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
161
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
162
|
-
method: 'PUT',
|
|
163
|
-
body: request.body,
|
|
164
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
165
|
-
apiOptions: this.apiOptions,
|
|
166
|
-
});
|
|
167
|
-
return response.json();
|
|
168
|
-
}
|
|
169
114
|
async getPolicyControlById(request) {
|
|
170
115
|
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', {
|
|
171
116
|
path: { policyControlId: request.policyControlId },
|
|
@@ -177,11 +122,10 @@ class DelegatedPolicyManagementClient {
|
|
|
177
122
|
});
|
|
178
123
|
return response.json();
|
|
179
124
|
}
|
|
180
|
-
async listPolicyControls(
|
|
181
|
-
var _a;
|
|
125
|
+
async listPolicyControls() {
|
|
182
126
|
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls', {
|
|
183
127
|
path: {},
|
|
184
|
-
query:
|
|
128
|
+
query: {},
|
|
185
129
|
});
|
|
186
130
|
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
187
131
|
method: 'GET',
|
|
@@ -243,33 +187,6 @@ class DelegatedPolicyManagementClient {
|
|
|
243
187
|
});
|
|
244
188
|
return response.json();
|
|
245
189
|
}
|
|
246
|
-
async updatePolicyRuleInit(request) {
|
|
247
|
-
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', {
|
|
248
|
-
path: { policyRuleId: request.policyRuleId },
|
|
249
|
-
query: {},
|
|
250
|
-
});
|
|
251
|
-
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
252
|
-
userActionHttpMethod: 'PUT',
|
|
253
|
-
userActionHttpPath: path,
|
|
254
|
-
userActionPayload: JSON.stringify(request.body),
|
|
255
|
-
userActionServerKind: 'Api',
|
|
256
|
-
}, this.apiOptions);
|
|
257
|
-
return challenge;
|
|
258
|
-
}
|
|
259
|
-
async updatePolicyRuleComplete(request, signedChallenge) {
|
|
260
|
-
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', {
|
|
261
|
-
path: { policyRuleId: request.policyRuleId },
|
|
262
|
-
query: {},
|
|
263
|
-
});
|
|
264
|
-
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
265
|
-
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
266
|
-
method: 'PUT',
|
|
267
|
-
body: request.body,
|
|
268
|
-
headers: { 'x-dfns-useraction': userAction },
|
|
269
|
-
apiOptions: this.apiOptions,
|
|
270
|
-
});
|
|
271
|
-
return response.json();
|
|
272
|
-
}
|
|
273
190
|
async getPolicyRuleById(request) {
|
|
274
191
|
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', {
|
|
275
192
|
path: { policyRuleId: request.policyRuleId },
|