Comparing version 0.11.4 to 0.11.5
@@ -42,2 +42,3 @@ import { Configuration, ApplicationOut, ListResponseApplicationOut, ApplicationIn, ListResponseEndpointOut, EndpointOut, EndpointIn, EndpointSecret, MessageOut, MessageIn, ListResponseMessageOut, DashboardAccessOut, ListResponseEndpointMessageOut, ListResponseMessageEndpointOut, ListResponseMessageAttemptEndpointOut, ListResponseMessageAttemptOut, MessageAttemptOut, MessageStatus, ListResponseEventTypeInOut, EventTypeInOut } from "./openapi/index"; | ||
get(appId: string, endpointId: string): Promise<EndpointOut>; | ||
update(appId: string, endpointId: string, endpointIn: EndpointIn): Promise<EndpointOut>; | ||
delete(appId: string, endpointId: string): Promise<void>; | ||
@@ -44,0 +45,0 @@ getSecret(appId: string, endpointId: string): Promise<EndpointSecret>; |
@@ -90,2 +90,5 @@ "use strict"; | ||
} | ||
update(appId, endpointId, endpointIn) { | ||
return this.api.updateEndpointApiV1AppAppIdEndpointEndpointIdPut({ appId, endpointId, endpointIn }); | ||
} | ||
delete(appId, endpointId) { | ||
@@ -92,0 +95,0 @@ return this.api.deleteEndpointApiV1AppAppIdEndpointEndpointIdDelete({ |
@@ -16,2 +16,3 @@ import { BaseAPIRequestFactory } from './baseapi'; | ||
listEndpointsApiV1AppAppIdEndpointGet(appId: string, iterator?: string, limit?: number, options?: Configuration): Promise<RequestContext>; | ||
updateEndpointApiV1AppAppIdEndpointEndpointIdPut(endpointId: string, appId: string, endpointIn: EndpointIn, options?: Configuration): Promise<RequestContext>; | ||
} | ||
@@ -25,2 +26,3 @@ export declare class EndpointApiResponseProcessor { | ||
listEndpointsApiV1AppAppIdEndpointGet(response: ResponseContext): Promise<ListResponseEndpointOut>; | ||
updateEndpointApiV1AppAppIdEndpointEndpointIdPut(response: ResponseContext): Promise<EndpointOut>; | ||
} |
@@ -158,2 +158,33 @@ "use strict"; | ||
} | ||
updateEndpointApiV1AppAppIdEndpointEndpointIdPut(endpointId, appId, endpointIn, options) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
let config = options || this.configuration; | ||
if (endpointId === null || endpointId === undefined) { | ||
throw new baseapi_1.RequiredError('Required parameter endpointId was null or undefined when calling updateEndpointApiV1AppAppIdEndpointEndpointIdPut.'); | ||
} | ||
if (appId === null || appId === undefined) { | ||
throw new baseapi_1.RequiredError('Required parameter appId was null or undefined when calling updateEndpointApiV1AppAppIdEndpointEndpointIdPut.'); | ||
} | ||
if (endpointIn === null || endpointIn === undefined) { | ||
throw new baseapi_1.RequiredError('Required parameter endpointIn was null or undefined when calling updateEndpointApiV1AppAppIdEndpointEndpointIdPut.'); | ||
} | ||
const localVarPath = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/' | ||
.replace('{' + 'endpoint_id' + '}', encodeURIComponent(String(endpointId))) | ||
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId))); | ||
const requestContext = config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT); | ||
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); | ||
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ | ||
"application/json" | ||
]); | ||
requestContext.setHeaderParam("Content-Type", contentType); | ||
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(endpointIn, "EndpointIn", ""), contentType); | ||
requestContext.setBody(serializedBody); | ||
let authMethod = null; | ||
authMethod = config.authMethods["HTTPBearer"]; | ||
if (authMethod) { | ||
yield authMethod.applySecurityAuthentication(requestContext); | ||
} | ||
return requestContext; | ||
}); | ||
} | ||
} | ||
@@ -371,4 +402,39 @@ exports.EndpointApiRequestFactory = EndpointApiRequestFactory; | ||
} | ||
updateEndpointApiV1AppAppIdEndpointEndpointIdPut(response) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]); | ||
if (util_1.isCodeInRange("200", response.httpStatusCode)) { | ||
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "EndpointOut", ""); | ||
return body; | ||
} | ||
if (util_1.isCodeInRange("401", response.httpStatusCode)) { | ||
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "HttpErrorOut", ""); | ||
throw new exception_1.ApiException(401, body); | ||
} | ||
if (util_1.isCodeInRange("403", response.httpStatusCode)) { | ||
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "HttpErrorOut", ""); | ||
throw new exception_1.ApiException(403, body); | ||
} | ||
if (util_1.isCodeInRange("404", response.httpStatusCode)) { | ||
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "HttpErrorOut", ""); | ||
throw new exception_1.ApiException(404, body); | ||
} | ||
if (util_1.isCodeInRange("409", response.httpStatusCode)) { | ||
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "HttpErrorOut", ""); | ||
throw new exception_1.ApiException(409, body); | ||
} | ||
if (util_1.isCodeInRange("422", response.httpStatusCode)) { | ||
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "HTTPValidationError", ""); | ||
throw new exception_1.ApiException(422, body); | ||
} | ||
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { | ||
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "EndpointOut", ""); | ||
return body; | ||
} | ||
let body = response.body || ""; | ||
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\""); | ||
}); | ||
} | ||
} | ||
exports.EndpointApiResponseProcessor = EndpointApiResponseProcessor; | ||
//# sourceMappingURL=EndpointApi.js.map |
@@ -9,2 +9,2 @@ export * from "./http/http"; | ||
export { PromiseMiddleware as Middleware } from './middleware'; | ||
export { ApplicationApiCreateApplicationApiV1AppPostRequest, ApplicationApiDeleteApplicationApiV1AppAppIdDeleteRequest, ApplicationApiGetApplicationApiV1AppAppIdGetRequest, ApplicationApiListApplicationsApiV1AppGetRequest, ApplicationApiUpdateApplicationApiV1AppAppIdPutRequest, ObjectApplicationApi as ApplicationApi, AuthenticationApiGetDashboardAccessApiV1AuthDashboardAccessAppIdPostRequest, AuthenticationApiLogoutApiV1AuthLogoutPostRequest, ObjectAuthenticationApi as AuthenticationApi, DevelopmentApiEchoApiV1DevelopmentEchoPostRequest, ObjectDevelopmentApi as DevelopmentApi, EndpointApiCreateEndpointApiV1AppAppIdEndpointPostRequest, EndpointApiDeleteEndpointApiV1AppAppIdEndpointEndpointIdDeleteRequest, EndpointApiGetEndpointApiV1AppAppIdEndpointEndpointIdGetRequest, EndpointApiGetEndpointSecretApiV1AppAppIdEndpointEndpointIdSecretGetRequest, EndpointApiGetEndpointStatsApiV1AppAppIdEndpointEndpointIdStatsGetRequest, EndpointApiListEndpointsApiV1AppAppIdEndpointGetRequest, ObjectEndpointApi as EndpointApi, EventTypeApiCreateEventTypeApiV1EventTypePostRequest, EventTypeApiDeleteEventTypeApiV1EventTypeEventTypeNameDeleteRequest, EventTypeApiListEventTypesApiV1EventTypeGetRequest, ObjectEventTypeApi as EventTypeApi, HealthApiHealthApiV1HealthGetRequest, ObjectHealthApi as HealthApi, MessageApiCreateMessageApiV1AppAppIdMsgPostRequest, MessageApiGetMessageApiV1AppAppIdMsgMsgIdGetRequest, MessageApiListMessagesApiV1AppAppIdMsgGetRequest, ObjectMessageApi as MessageApi, MessageAttemptApiGetAttemptApiV1AppAppIdMsgMsgIdAttemptAttemptIdGetRequest, MessageAttemptApiListAttemptedDestinationsApiV1AppAppIdMsgMsgIdEndpointGetRequest, MessageAttemptApiListAttemptedMessagesApiV1AppAppIdEndpointEndpointIdMsgGetRequest, MessageAttemptApiListAttemptsApiV1AppAppIdMsgMsgIdAttemptGetRequest, MessageAttemptApiListAttemptsForEndpointApiV1AppAppIdMsgMsgIdEndpointEndpointIdAttemptGetRequest, MessageAttemptApiResendWebhookApiV1AppAppIdMsgMsgIdEndpointEndpointIdResendPostRequest, ObjectMessageAttemptApi as MessageAttemptApi } from './types/ObjectParamAPI'; | ||
export { ApplicationApiCreateApplicationApiV1AppPostRequest, ApplicationApiDeleteApplicationApiV1AppAppIdDeleteRequest, ApplicationApiGetApplicationApiV1AppAppIdGetRequest, ApplicationApiListApplicationsApiV1AppGetRequest, ApplicationApiUpdateApplicationApiV1AppAppIdPutRequest, ObjectApplicationApi as ApplicationApi, AuthenticationApiGetDashboardAccessApiV1AuthDashboardAccessAppIdPostRequest, AuthenticationApiLogoutApiV1AuthLogoutPostRequest, ObjectAuthenticationApi as AuthenticationApi, DevelopmentApiEchoApiV1DevelopmentEchoPostRequest, ObjectDevelopmentApi as DevelopmentApi, EndpointApiCreateEndpointApiV1AppAppIdEndpointPostRequest, EndpointApiDeleteEndpointApiV1AppAppIdEndpointEndpointIdDeleteRequest, EndpointApiGetEndpointApiV1AppAppIdEndpointEndpointIdGetRequest, EndpointApiGetEndpointSecretApiV1AppAppIdEndpointEndpointIdSecretGetRequest, EndpointApiGetEndpointStatsApiV1AppAppIdEndpointEndpointIdStatsGetRequest, EndpointApiListEndpointsApiV1AppAppIdEndpointGetRequest, EndpointApiUpdateEndpointApiV1AppAppIdEndpointEndpointIdPutRequest, ObjectEndpointApi as EndpointApi, EventTypeApiCreateEventTypeApiV1EventTypePostRequest, EventTypeApiDeleteEventTypeApiV1EventTypeEventTypeNameDeleteRequest, EventTypeApiListEventTypesApiV1EventTypeGetRequest, ObjectEventTypeApi as EventTypeApi, HealthApiHealthApiV1HealthGetRequest, ObjectHealthApi as HealthApi, MessageApiCreateMessageApiV1AppAppIdMsgPostRequest, MessageApiGetMessageApiV1AppAppIdMsgMsgIdGetRequest, MessageApiListMessagesApiV1AppAppIdMsgGetRequest, ObjectMessageApi as MessageApi, MessageAttemptApiGetAttemptApiV1AppAppIdMsgMsgIdAttemptAttemptIdGetRequest, MessageAttemptApiListAttemptedDestinationsApiV1AppAppIdMsgMsgIdEndpointGetRequest, MessageAttemptApiListAttemptedMessagesApiV1AppAppIdEndpointEndpointIdMsgGetRequest, MessageAttemptApiListAttemptsApiV1AppAppIdMsgMsgIdAttemptGetRequest, MessageAttemptApiListAttemptsForEndpointApiV1AppAppIdMsgMsgIdEndpointEndpointIdAttemptGetRequest, MessageAttemptApiResendWebhookApiV1AppAppIdMsgMsgIdEndpointEndpointIdResendPostRequest, ObjectMessageAttemptApi as MessageAttemptApi } from './types/ObjectParamAPI'; |
@@ -95,2 +95,7 @@ import { Configuration } from '../configuration'; | ||
} | ||
export interface EndpointApiUpdateEndpointApiV1AppAppIdEndpointEndpointIdPutRequest { | ||
endpointId: string; | ||
appId: string; | ||
endpointIn: EndpointIn; | ||
} | ||
export declare class ObjectEndpointApi { | ||
@@ -105,2 +110,3 @@ private api; | ||
listEndpointsApiV1AppAppIdEndpointGet(param: EndpointApiListEndpointsApiV1AppAppIdEndpointGetRequest, options?: Configuration): Promise<ListResponseEndpointOut>; | ||
updateEndpointApiV1AppAppIdEndpointEndpointIdPut(param: EndpointApiUpdateEndpointApiV1AppAppIdEndpointEndpointIdPutRequest, options?: Configuration): Promise<EndpointOut>; | ||
} | ||
@@ -107,0 +113,0 @@ import { EventTypeApiRequestFactory, EventTypeApiResponseProcessor } from "../apis/EventTypeApi"; |
@@ -72,2 +72,5 @@ "use strict"; | ||
} | ||
updateEndpointApiV1AppAppIdEndpointEndpointIdPut(param, options) { | ||
return this.api.updateEndpointApiV1AppAppIdEndpointEndpointIdPut(param.endpointId, param.appId, param.endpointIn, options).toPromise(); | ||
} | ||
} | ||
@@ -74,0 +77,0 @@ exports.ObjectEndpointApi = ObjectEndpointApi; |
@@ -64,2 +64,3 @@ import { Configuration } from '../configuration'; | ||
listEndpointsApiV1AppAppIdEndpointGet(appId: string, iterator?: string, limit?: number, options?: Configuration): Observable<ListResponseEndpointOut>; | ||
updateEndpointApiV1AppAppIdEndpointEndpointIdPut(endpointId: string, appId: string, endpointIn: EndpointIn, options?: Configuration): Observable<EndpointOut>; | ||
} | ||
@@ -66,0 +67,0 @@ import { EventTypeApiRequestFactory, EventTypeApiResponseProcessor } from "../apis/EventTypeApi"; |
@@ -250,2 +250,17 @@ "use strict"; | ||
} | ||
updateEndpointApiV1AppAppIdEndpointEndpointIdPut(endpointId, appId, endpointIn, options) { | ||
const requestContextPromise = this.requestFactory.updateEndpointApiV1AppAppIdEndpointEndpointIdPut(endpointId, appId, endpointIn, options); | ||
let middlewarePreObservable = rxjsStub_1.from(requestContextPromise); | ||
for (let middleware of this.configuration.middleware) { | ||
middlewarePreObservable = middlewarePreObservable.pipe(rxjsStub_2.mergeMap((ctx) => middleware.pre(ctx))); | ||
} | ||
return middlewarePreObservable.pipe(rxjsStub_2.mergeMap((ctx) => this.configuration.httpApi.send(ctx))). | ||
pipe(rxjsStub_2.mergeMap((response) => { | ||
let middlewarePostObservable = rxjsStub_1.of(response); | ||
for (let middleware of this.configuration.middleware) { | ||
middlewarePostObservable = middlewarePostObservable.pipe(rxjsStub_2.mergeMap((rsp) => middleware.post(rsp))); | ||
} | ||
return middlewarePostObservable.pipe(rxjsStub_2.map((rsp) => this.responseProcessor.updateEndpointApiV1AppAppIdEndpointEndpointIdPut(rsp))); | ||
})); | ||
} | ||
} | ||
@@ -252,0 +267,0 @@ exports.ObservableEndpointApi = ObservableEndpointApi; |
@@ -55,2 +55,3 @@ import { Configuration } from '../configuration'; | ||
listEndpointsApiV1AppAppIdEndpointGet(appId: string, iterator?: string, limit?: number, options?: Configuration): Promise<ListResponseEndpointOut>; | ||
updateEndpointApiV1AppAppIdEndpointEndpointIdPut(endpointId: string, appId: string, endpointIn: EndpointIn, options?: Configuration): Promise<EndpointOut>; | ||
} | ||
@@ -57,0 +58,0 @@ import { EventTypeApiRequestFactory, EventTypeApiResponseProcessor } from "../apis/EventTypeApi"; |
@@ -86,2 +86,6 @@ "use strict"; | ||
} | ||
updateEndpointApiV1AppAppIdEndpointEndpointIdPut(endpointId, appId, endpointIn, options) { | ||
const result = this.api.updateEndpointApiV1AppAppIdEndpointEndpointIdPut(endpointId, appId, endpointIn, options); | ||
return result.toPromise(); | ||
} | ||
} | ||
@@ -88,0 +92,0 @@ exports.PromiseEndpointApi = PromiseEndpointApi; |
{ | ||
"name": "diahook", | ||
"version": "0.11.4", | ||
"version": "0.11.5", | ||
"description": "Diahook API client", | ||
@@ -5,0 +5,0 @@ "author": "diahook", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
468350
5852