@dfns/sdk
Advanced tools
Comparing version 0.1.0-alpha.2 to 0.1.0-alpha.3
@@ -12,4 +12,3 @@ import { DfnsApiClientOptions } from '../../dfnsApiClient'; | ||
listAssetAccounts(request: T.ListAssetAccountsRequest): Promise<T.ListAssetAccountsResponse>; | ||
archiveAssetAccount(request: T.ArchiveAssetAccountRequest): Promise<T.ArchiveAssetAccountResponse>; | ||
getAssetAccountBalanceById(request: T.GetAssetAccountBalanceByIdRequest): Promise<T.GetAssetAccountBalanceByIdResponse>; | ||
} |
@@ -82,13 +82,2 @@ "use strict"; | ||
} | ||
async archiveAssetAccount(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/assets/asset-accounts/:assetAccountId', { | ||
path: { assetAccountId: request.assetAccountId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'DELETE', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getAssetAccountBalanceById(request) { | ||
@@ -95,0 +84,0 @@ const path = (0, url_1.buildPathAndQuery)('/assets/asset-accounts/:assetAccountId/balance', { |
@@ -15,5 +15,3 @@ import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi'; | ||
listAssetAccounts(request: T.ListAssetAccountsRequest): Promise<T.ListAssetAccountsResponse>; | ||
archiveAssetAccountInit(request: T.ArchiveAssetAccountRequest): Promise<UserActionChallengeResponse>; | ||
archiveAssetAccountComplete(request: T.ArchiveAssetAccountRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchiveAssetAccountResponse>; | ||
getAssetAccountBalanceById(request: T.GetAssetAccountBalanceByIdRequest): Promise<T.GetAssetAccountBalanceByIdResponse>; | ||
} |
@@ -113,29 +113,2 @@ "use strict"; | ||
} | ||
async archiveAssetAccountInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/assets/asset-accounts/:assetAccountId', { | ||
path: { assetAccountId: request.assetAccountId }, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'DELETE', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify({}), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async archiveAssetAccountComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/assets/asset-accounts/:assetAccountId', { | ||
path: { assetAccountId: request.assetAccountId }, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'DELETE', | ||
body: {}, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getAssetAccountBalanceById(request) { | ||
@@ -142,0 +115,0 @@ const path = (0, url_1.buildPathAndQuery)('/assets/asset-accounts/:assetAccountId/balance', { |
@@ -15,3 +15,5 @@ import * as Assets from '../datamodel/Assets'; | ||
}; | ||
export type ListPaymentsResponse = Assets.Payment; | ||
export type ListPaymentsResponse = { | ||
items: Assets.Payment[]; | ||
}; | ||
export type CreateAssetAccountRequest = { | ||
@@ -33,6 +35,2 @@ body: Assets.CreateAssetAccountInput; | ||
}; | ||
export type ArchiveAssetAccountRequest = { | ||
assetAccountId: string; | ||
}; | ||
export type ArchiveAssetAccountResponse = Assets.AssetAccount; | ||
export type GetAssetAccountBalanceByIdRequest = { | ||
@@ -39,0 +37,0 @@ assetAccountId: string; |
@@ -33,9 +33,2 @@ import { DfnsApiClientOptions } from '../../dfnsApiClient'; | ||
deactivateServiceAccount(request: T.DeactivateServiceAccountRequest): Promise<T.DeactivateServiceAccountResponse>; | ||
listServiceAccountTokens(request: T.ListServiceAccountTokensRequest): Promise<T.ListServiceAccountTokensResponse>; | ||
createServiceAccountToken(request: T.CreateServiceAccountTokenRequest): Promise<T.CreateServiceAccountTokenResponse>; | ||
getServiceAccountToken(request: T.GetServiceAccountTokenRequest): Promise<T.GetServiceAccountTokenResponse>; | ||
updateServiceAccountToken(request: T.UpdateServiceAccountTokenRequest): Promise<T.UpdateServiceAccountTokenResponse>; | ||
archiveServiceAccountToken(request: T.ArchiveServiceAccountTokenRequest): Promise<T.ArchiveServiceAccountTokenResponse>; | ||
activateServiceAccountToken(request: T.ActivateServiceAccountTokenRequest): Promise<T.ActivateServiceAccountTokenResponse>; | ||
deactivateServiceAccountToken(request: T.DeactivateServiceAccountTokenRequest): Promise<T.DeactivateServiceAccountTokenResponse>; | ||
listUsers(): Promise<T.ListUsersResponse>; | ||
@@ -55,10 +48,3 @@ createUser(request: T.CreateUserRequest): Promise<T.CreateUserResponse>; | ||
deactivateApplication(request: T.DeactivateApplicationRequest): Promise<T.DeactivateApplicationResponse>; | ||
listApplicationTokens(request: T.ListApplicationTokensRequest): Promise<T.ListApplicationTokensResponse>; | ||
createApplicationToken(request: T.CreateApplicationTokenRequest): Promise<T.CreateApplicationTokenResponse>; | ||
getApplicationToken(request: T.GetApplicationTokenRequest): Promise<T.GetApplicationTokenResponse>; | ||
updateApplicationToken(request: T.UpdateApplicationTokenRequest): Promise<T.UpdateApplicationTokenResponse>; | ||
archiveApplicationToken(request: T.ArchiveApplicationTokenRequest): Promise<T.ArchiveApplicationTokenResponse>; | ||
activateApplicationToken(request: T.ActivateApplicationTokenRequest): Promise<T.ActivateApplicationTokenResponse>; | ||
deactivateApplicationToken(request: T.DeactivateApplicationTokenRequest): Promise<T.DeactivateApplicationTokenResponse>; | ||
createUserRecovery(request: T.CreateUserRecoveryRequest): Promise<T.CreateUserRecoveryResponse>; | ||
} |
@@ -323,96 +323,2 @@ "use strict"; | ||
} | ||
async listServiceAccountTokens(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens', { | ||
path: { serviceAccountId: request.serviceAccountId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async createServiceAccountToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', { | ||
path: { serviceAccountId: request.serviceAccountId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'POST', | ||
body: request.body, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getServiceAccountToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async updateServiceAccountToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'PUT', | ||
body: request.body, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async archiveServiceAccountToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'DELETE', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async activateServiceAccountToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/activate', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'PUT', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async deactivateServiceAccountToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/deactivate', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'PUT', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async listUsers() { | ||
@@ -576,81 +482,2 @@ const path = (0, url_1.buildPathAndQuery)('/auth/users', { | ||
} | ||
async listApplicationTokens(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens', { | ||
path: { appId: request.appId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async createApplicationToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens', { | ||
path: { appId: request.appId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'POST', | ||
body: request.body, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getApplicationToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens/:tokenId', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async updateApplicationToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens/:tokenId', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'PUT', | ||
body: request.body, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async archiveApplicationToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'DELETE', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async activateApplicationToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/activate', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'PUT', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async deactivateApplicationToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/deactivate', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'PUT', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async createUserRecovery(request) { | ||
@@ -657,0 +484,0 @@ const path = (0, url_1.buildPathAndQuery)('/auth/recover/user', { |
@@ -49,14 +49,2 @@ import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi'; | ||
deactivateServiceAccountComplete(request: T.DeactivateServiceAccountRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.DeactivateServiceAccountResponse>; | ||
listServiceAccountTokens(request: T.ListServiceAccountTokensRequest): Promise<T.ListServiceAccountTokensResponse>; | ||
createServiceAccountTokenInit(request: T.CreateServiceAccountTokenRequest): Promise<UserActionChallengeResponse>; | ||
createServiceAccountTokenComplete(request: T.CreateServiceAccountTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateServiceAccountTokenResponse>; | ||
getServiceAccountToken(request: T.GetServiceAccountTokenRequest): Promise<T.GetServiceAccountTokenResponse>; | ||
updateServiceAccountTokenInit(request: T.UpdateServiceAccountTokenRequest): Promise<UserActionChallengeResponse>; | ||
updateServiceAccountTokenComplete(request: T.UpdateServiceAccountTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdateServiceAccountTokenResponse>; | ||
archiveServiceAccountTokenInit(request: T.ArchiveServiceAccountTokenRequest): Promise<UserActionChallengeResponse>; | ||
archiveServiceAccountTokenComplete(request: T.ArchiveServiceAccountTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchiveServiceAccountTokenResponse>; | ||
activateServiceAccountTokenInit(request: T.ActivateServiceAccountTokenRequest): Promise<UserActionChallengeResponse>; | ||
activateServiceAccountTokenComplete(request: T.ActivateServiceAccountTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ActivateServiceAccountTokenResponse>; | ||
deactivateServiceAccountTokenInit(request: T.DeactivateServiceAccountTokenRequest): Promise<UserActionChallengeResponse>; | ||
deactivateServiceAccountTokenComplete(request: T.DeactivateServiceAccountTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.DeactivateServiceAccountTokenResponse>; | ||
listUsers(): Promise<T.ListUsersResponse>; | ||
@@ -86,15 +74,3 @@ createUserInit(request: T.CreateUserRequest): Promise<UserActionChallengeResponse>; | ||
deactivateApplicationComplete(request: T.DeactivateApplicationRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.DeactivateApplicationResponse>; | ||
listApplicationTokens(request: T.ListApplicationTokensRequest): Promise<T.ListApplicationTokensResponse>; | ||
createApplicationTokenInit(request: T.CreateApplicationTokenRequest): Promise<UserActionChallengeResponse>; | ||
createApplicationTokenComplete(request: T.CreateApplicationTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateApplicationTokenResponse>; | ||
getApplicationToken(request: T.GetApplicationTokenRequest): Promise<T.GetApplicationTokenResponse>; | ||
updateApplicationTokenInit(request: T.UpdateApplicationTokenRequest): Promise<UserActionChallengeResponse>; | ||
updateApplicationTokenComplete(request: T.UpdateApplicationTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdateApplicationTokenResponse>; | ||
archiveApplicationTokenInit(request: T.ArchiveApplicationTokenRequest): Promise<UserActionChallengeResponse>; | ||
archiveApplicationTokenComplete(request: T.ArchiveApplicationTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ArchiveApplicationTokenResponse>; | ||
activateApplicationTokenInit(request: T.ActivateApplicationTokenRequest): Promise<UserActionChallengeResponse>; | ||
activateApplicationTokenComplete(request: T.ActivateApplicationTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ActivateApplicationTokenResponse>; | ||
deactivateApplicationTokenInit(request: T.DeactivateApplicationTokenRequest): Promise<UserActionChallengeResponse>; | ||
deactivateApplicationTokenComplete(request: T.DeactivateApplicationTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.DeactivateApplicationTokenResponse>; | ||
createUserRecovery(request: T.CreateUserRecoveryRequest): Promise<T.CreateUserRecoveryResponse>; | ||
} |
@@ -555,186 +555,2 @@ "use strict"; | ||
} | ||
async listServiceAccountTokens(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens', { | ||
path: { serviceAccountId: request.serviceAccountId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async createServiceAccountTokenInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', { | ||
path: { serviceAccountId: request.serviceAccountId }, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'POST', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify(request.body), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async createServiceAccountTokenComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', { | ||
path: { serviceAccountId: request.serviceAccountId }, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'POST', | ||
body: request.body, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getServiceAccountToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async updateServiceAccountTokenInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'PUT', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify(request.body), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async updateServiceAccountTokenComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'PUT', | ||
body: request.body, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async archiveServiceAccountTokenInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'DELETE', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify({}), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async archiveServiceAccountTokenComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'DELETE', | ||
body: {}, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async activateServiceAccountTokenInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/activate', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'PUT', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify({}), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async activateServiceAccountTokenComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/activate', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'PUT', | ||
body: {}, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async deactivateServiceAccountTokenInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/deactivate', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'PUT', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify({}), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async deactivateServiceAccountTokenComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/tokens/:tokenId/deactivate', { | ||
path: { | ||
serviceAccountId: request.serviceAccountId, | ||
tokenId: request.tokenId, | ||
}, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'PUT', | ||
body: {}, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async listUsers() { | ||
@@ -1054,159 +870,2 @@ const path = (0, url_1.buildPathAndQuery)('/auth/users', { | ||
} | ||
async listApplicationTokens(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens', { | ||
path: { appId: request.appId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async createApplicationTokenInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens', { | ||
path: { appId: request.appId }, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'POST', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify(request.body), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async createApplicationTokenComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens', { | ||
path: { appId: request.appId }, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'POST', | ||
body: request.body, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getApplicationToken(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens/:tokenId', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async updateApplicationTokenInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens/:tokenId', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'PUT', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify(request.body), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async updateApplicationTokenComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/tokens/:tokenId', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'PUT', | ||
body: request.body, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async archiveApplicationTokenInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'DELETE', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify({}), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async archiveApplicationTokenComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'DELETE', | ||
body: {}, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async activateApplicationTokenInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/activate', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'PUT', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify({}), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async activateApplicationTokenComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/activate', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'PUT', | ||
body: {}, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async deactivateApplicationTokenInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/deactivate', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'PUT', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify({}), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async deactivateApplicationTokenComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/token/:tokenId/deactivate', { | ||
path: { appId: request.appId, tokenId: request.tokenId }, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'PUT', | ||
body: {}, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async createUserRecovery(request) { | ||
@@ -1213,0 +872,0 @@ const path = (0, url_1.buildPathAndQuery)('/auth/recover/user', { |
@@ -110,39 +110,2 @@ import * as Auth from '../datamodel/Auth'; | ||
export type DeactivateServiceAccountResponse = Auth.UserAccessTokenInformation; | ||
export type ListServiceAccountTokensRequest = { | ||
serviceAccountId: Foundations.EntityId; | ||
}; | ||
export type ListServiceAccountTokensResponse = { | ||
items: Auth.AccessTokenInfoWithPublicKey[]; | ||
}; | ||
export type CreateServiceAccountTokenRequest = { | ||
serviceAccountId: Foundations.EntityId; | ||
body: Auth.CreateAccessTokenInput; | ||
}; | ||
export type CreateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type GetServiceAccountTokenRequest = { | ||
serviceAccountId: Foundations.EntityId; | ||
tokenId: Foundations.EntityId; | ||
}; | ||
export type GetServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type UpdateServiceAccountTokenRequest = { | ||
serviceAccountId: Foundations.EntityId; | ||
tokenId: Foundations.EntityId; | ||
body: Auth.UpdateAccessTokenInput; | ||
}; | ||
export type UpdateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type ArchiveServiceAccountTokenRequest = { | ||
serviceAccountId: Foundations.EntityId; | ||
tokenId: Foundations.EntityId; | ||
}; | ||
export type ArchiveServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type ActivateServiceAccountTokenRequest = { | ||
serviceAccountId: Foundations.EntityId; | ||
tokenId: Foundations.EntityId; | ||
}; | ||
export type ActivateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type DeactivateServiceAccountTokenRequest = { | ||
serviceAccountId: Foundations.EntityId; | ||
tokenId: Foundations.EntityId; | ||
}; | ||
export type DeactivateServiceAccountTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type ListUsersResponse = { | ||
@@ -204,39 +167,2 @@ items: Auth.UserInfo[]; | ||
export type DeactivateApplicationResponse = Auth.AppInfoWithPublicKey; | ||
export type ListApplicationTokensRequest = { | ||
appId: Foundations.EntityId; | ||
}; | ||
export type ListApplicationTokensResponse = { | ||
items: Auth.AccessTokenInfoWithPublicKey[]; | ||
}; | ||
export type CreateApplicationTokenRequest = { | ||
appId: Foundations.EntityId; | ||
body: Auth.CreateAccessTokenInput; | ||
}; | ||
export type CreateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type GetApplicationTokenRequest = { | ||
appId: Foundations.EntityId; | ||
tokenId: Foundations.EntityId; | ||
}; | ||
export type GetApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type UpdateApplicationTokenRequest = { | ||
appId: Foundations.EntityId; | ||
tokenId: Foundations.EntityId; | ||
body: Auth.UpdateAccessTokenInput; | ||
}; | ||
export type UpdateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type ArchiveApplicationTokenRequest = { | ||
appId: Foundations.EntityId; | ||
tokenId: Foundations.EntityId; | ||
}; | ||
export type ArchiveApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type ActivateApplicationTokenRequest = { | ||
appId: Foundations.EntityId; | ||
tokenId: Foundations.EntityId; | ||
}; | ||
export type ActivateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type DeactivateApplicationTokenRequest = { | ||
appId: Foundations.EntityId; | ||
tokenId: Foundations.EntityId; | ||
}; | ||
export type DeactivateApplicationTokenResponse = Auth.AccessTokenInfoWithPublicKey; | ||
export type CreateUserRecoveryRequest = { | ||
@@ -243,0 +169,0 @@ body: Auth.CreateUserLoginChallengeInput; |
@@ -14,3 +14,5 @@ import { BadRequestError, EntityNotFoundError, ForbiddenError, PaymentRequiredError, UnauthorizedError } from '../Foundations'; | ||
export type GetPaymentByIdResponse = GetPaymentByIdSuccess | GetPaymentByIdError; | ||
export type ListPaymentsSuccess = Payment; | ||
export type ListPaymentsSuccess = { | ||
items: Payment[]; | ||
}; | ||
export type ListPaymentsError = { | ||
@@ -17,0 +19,0 @@ error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError; |
import { BadRequestError, EntityNotFoundError, ForbiddenError, UnauthorizedError } from '../Foundations'; | ||
import { PolicyControlExecution } from './types'; | ||
export type ListPolicyControlExecutionsSuccess = PolicyControlExecution; | ||
export type ListPolicyControlExecutionsSuccess = { | ||
items: PolicyControlExecution[]; | ||
}; | ||
export type ListPolicyControlExecutionsError = { | ||
@@ -5,0 +7,0 @@ error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError; |
@@ -27,3 +27,2 @@ import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi'; | ||
listPermissionAssignments(request: T.ListPermissionAssignmentsRequest): Promise<T.ListPermissionAssignmentsResponse>; | ||
listPermissionsHistorical(request: T.ListPermissionsHistoricalRequest): Promise<T.ListPermissionsHistoricalResponse>; | ||
} |
@@ -284,15 +284,3 @@ "use strict"; | ||
} | ||
async listPermissionsHistorical(request) { | ||
var _a; | ||
const path = (0, url_1.buildPathAndQuery)('/audit/permissions', { | ||
path: {}, | ||
query: (_a = request.query) !== null && _a !== void 0 ? _a : {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
} | ||
exports.DelegatedPermissionsClient = DelegatedPermissionsClient; |
@@ -18,3 +18,2 @@ import { DfnsApiClientOptions } from '../../dfnsApiClient'; | ||
listPermissionAssignments(request: T.ListPermissionAssignmentsRequest): Promise<T.ListPermissionAssignmentsResponse>; | ||
listPermissionsHistorical(request: T.ListPermissionsHistoricalRequest): Promise<T.ListPermissionsHistoricalResponse>; | ||
} |
@@ -156,15 +156,3 @@ "use strict"; | ||
} | ||
async listPermissionsHistorical(request) { | ||
var _a; | ||
const path = (0, url_1.buildPathAndQuery)('/audit/permissions', { | ||
path: {}, | ||
query: (_a = request.query) !== null && _a !== void 0 ? _a : {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
} | ||
exports.PermissionsClient = PermissionsClient; |
@@ -64,9 +64,1 @@ import * as Permissions from '../datamodel/Permissions'; | ||
}; | ||
export type ListPermissionsHistoricalRequest = { | ||
query?: { | ||
permissionName?: string; | ||
}; | ||
}; | ||
export type ListPermissionsHistoricalResponse = { | ||
items: Permissions.Permission[]; | ||
}; |
@@ -7,3 +7,5 @@ import * as PolicyExecution from '../datamodel/PolicyExecution'; | ||
}; | ||
export type ListPolicyControlExecutionsResponse = PolicyExecution.PolicyControlExecution; | ||
export type ListPolicyControlExecutionsResponse = { | ||
items: PolicyExecution.PolicyControlExecution[]; | ||
}; | ||
export type GetPolicyControlExecutionByIdRequest = { | ||
@@ -10,0 +12,0 @@ policyControlExecutionId: string; |
@@ -9,4 +9,2 @@ import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi'; | ||
createPolicyComplete(request: T.CreatePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyResponse>; | ||
updatePolicyInit(request: T.UpdatePolicyRequest): Promise<UserActionChallengeResponse>; | ||
updatePolicyComplete(request: T.UpdatePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdatePolicyResponse>; | ||
getPolicyById(request: T.GetPolicyByIdRequest): Promise<T.GetPolicyByIdResponse>; | ||
@@ -18,4 +16,2 @@ listPolicies(request: T.ListPoliciesRequest): Promise<T.ListPoliciesResponse>; | ||
createPolicyControlComplete(request: T.CreatePolicyControlRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyControlResponse>; | ||
updatePolicyControlInit(request: T.UpdatePolicyControlRequest): Promise<UserActionChallengeResponse>; | ||
updatePolicyControlComplete(request: T.UpdatePolicyControlRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdatePolicyControlResponse>; | ||
getPolicyControlById(request: T.GetPolicyControlByIdRequest): Promise<T.GetPolicyControlByIdResponse>; | ||
@@ -27,4 +23,2 @@ listPolicyControls(request: T.ListPolicyControlsRequest): Promise<T.ListPolicyControlsResponse>; | ||
createPolicyRuleComplete(request: T.CreatePolicyRuleRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyRuleResponse>; | ||
updatePolicyRuleInit(request: T.UpdatePolicyRuleRequest): Promise<UserActionChallengeResponse>; | ||
updatePolicyRuleComplete(request: T.UpdatePolicyRuleRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdatePolicyRuleResponse>; | ||
getPolicyRuleById(request: T.GetPolicyRuleByIdRequest): Promise<T.GetPolicyRuleByIdResponse>; | ||
@@ -31,0 +25,0 @@ listPolicyRules(request: T.ListPolicyRulesRequest): Promise<T.ListPolicyRulesResponse>; |
@@ -38,29 +38,2 @@ "use strict"; | ||
} | ||
async updatePolicyInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', { | ||
path: { policyId: request.policyId }, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'PUT', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify(request.body), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async updatePolicyComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', { | ||
path: { policyId: request.policyId }, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'PUT', | ||
body: request.body, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getPolicyById(request) { | ||
@@ -143,29 +116,2 @@ const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', { | ||
} | ||
async updatePolicyControlInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', { | ||
path: { policyControlId: request.policyControlId }, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'PUT', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify(request.body), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async updatePolicyControlComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', { | ||
path: { policyControlId: request.policyControlId }, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'PUT', | ||
body: request.body, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getPolicyControlById(request) { | ||
@@ -248,29 +194,2 @@ const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', { | ||
} | ||
async updatePolicyRuleInit(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', { | ||
path: { policyRuleId: request.policyRuleId }, | ||
query: {}, | ||
}); | ||
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({ | ||
userActionHttpMethod: 'PUT', | ||
userActionHttpPath: path, | ||
userActionPayload: JSON.stringify(request.body), | ||
userActionServerKind: 'Api', | ||
}, this.apiOptions); | ||
return challenge; | ||
} | ||
async updatePolicyRuleComplete(request, signedChallenge) { | ||
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', { | ||
path: { policyRuleId: request.policyRuleId }, | ||
query: {}, | ||
}); | ||
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'PUT', | ||
body: request.body, | ||
headers: { 'x-dfns-useraction': userAction }, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getPolicyRuleById(request) { | ||
@@ -277,0 +196,0 @@ const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', { |
@@ -7,3 +7,2 @@ import { DfnsApiClientOptions } from '../../dfnsApiClient'; | ||
createPolicy(request: T.CreatePolicyRequest): Promise<T.CreatePolicyResponse>; | ||
updatePolicy(request: T.UpdatePolicyRequest): Promise<T.UpdatePolicyResponse>; | ||
getPolicyById(request: T.GetPolicyByIdRequest): Promise<T.GetPolicyByIdResponse>; | ||
@@ -13,3 +12,2 @@ listPolicies(request: T.ListPoliciesRequest): Promise<T.ListPoliciesResponse>; | ||
createPolicyControl(request: T.CreatePolicyControlRequest): Promise<T.CreatePolicyControlResponse>; | ||
updatePolicyControl(request: T.UpdatePolicyControlRequest): Promise<T.UpdatePolicyControlResponse>; | ||
getPolicyControlById(request: T.GetPolicyControlByIdRequest): Promise<T.GetPolicyControlByIdResponse>; | ||
@@ -19,3 +17,2 @@ listPolicyControls(request: T.ListPolicyControlsRequest): Promise<T.ListPolicyControlsResponse>; | ||
createPolicyRule(request: T.CreatePolicyRuleRequest): Promise<T.CreatePolicyRuleResponse>; | ||
updatePolicyRule(request: T.UpdatePolicyRuleRequest): Promise<T.UpdatePolicyRuleResponse>; | ||
getPolicyRuleById(request: T.GetPolicyRuleByIdRequest): Promise<T.GetPolicyRuleByIdResponse>; | ||
@@ -22,0 +19,0 @@ listPolicyRules(request: T.ListPolicyRulesRequest): Promise<T.ListPolicyRulesResponse>; |
@@ -22,14 +22,2 @@ "use strict"; | ||
} | ||
async updatePolicy(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', { | ||
path: { policyId: request.policyId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'PUT', | ||
body: request.body, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getPolicyById(request) { | ||
@@ -81,14 +69,2 @@ const path = (0, url_1.buildPathAndQuery)('/policies/:policyId', { | ||
} | ||
async updatePolicyControl(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', { | ||
path: { policyControlId: request.policyControlId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'PUT', | ||
body: request.body, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getPolicyControlById(request) { | ||
@@ -140,14 +116,2 @@ const path = (0, url_1.buildPathAndQuery)('/policies/policy-controls/:policyControlId', { | ||
} | ||
async updatePolicyRule(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', { | ||
path: { policyRuleId: request.policyRuleId }, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.userActionFetch)(path, { | ||
method: 'PUT', | ||
body: request.body, | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async getPolicyRuleById(request) { | ||
@@ -154,0 +118,0 @@ const path = (0, url_1.buildPathAndQuery)('/policies/policy-rules/:policyRuleId', { |
@@ -6,7 +6,2 @@ import * as PolicyManagement from '../datamodel/PolicyManagement'; | ||
export type CreatePolicyResponse = PolicyManagement.Policy; | ||
export type UpdatePolicyRequest = { | ||
policyId: string; | ||
body: PolicyManagement.UpdatePolicyInput; | ||
}; | ||
export type UpdatePolicyResponse = PolicyManagement.Policy; | ||
export type GetPolicyByIdRequest = { | ||
@@ -37,7 +32,2 @@ policyId: string; | ||
export type CreatePolicyControlResponse = PolicyManagement.PolicyControl; | ||
export type UpdatePolicyControlRequest = { | ||
policyControlId: string; | ||
body: PolicyManagement.UpdatePolicyControlInput; | ||
}; | ||
export type UpdatePolicyControlResponse = PolicyManagement.PolicyControl; | ||
export type GetPolicyControlByIdRequest = { | ||
@@ -68,7 +58,2 @@ policyControlId: string; | ||
export type CreatePolicyRuleResponse = PolicyManagement.Policy; | ||
export type UpdatePolicyRuleRequest = { | ||
policyRuleId: string; | ||
body: PolicyManagement.UpdatePolicyInput; | ||
}; | ||
export type UpdatePolicyRuleResponse = PolicyManagement.Policy; | ||
export type GetPolicyRuleByIdRequest = { | ||
@@ -75,0 +60,0 @@ policyRuleId: string; |
{ | ||
"name": "@dfns/sdk", | ||
"version": "0.1.0-alpha.2", | ||
"version": "0.1.0-alpha.3", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "buffer": "^6.0.3", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2205450
76641