-
Notifications
You must be signed in to change notification settings - Fork 247
Expand file tree
/
Copy pathendpointAutoConfig.ts
More file actions
27 lines (22 loc) · 952 Bytes
/
endpointAutoConfig.ts
File metadata and controls
27 lines (22 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// this file is @generated
import { type EndpointOut, EndpointOutSerializer } from "../models/endpointOut";
import { type SubscribeIn, SubscribeInSerializer } from "../models/subscribeIn";
import { HttpMethod, SvixRequest, type SvixRequestContext } from "../request";
export class EndpointAutoConfig {
public constructor(private readonly requestCtx: SvixRequestContext) {}
/** Update an auto-config endpoint by providing endpoint details. */
public update(
appId: string,
endpointId: string,
subscribeIn: SubscribeIn
): Promise<EndpointOut> {
const request = new SvixRequest(
HttpMethod.PUT,
"/api/v1/app/{app_id}/endpoint/{endpoint_id}/auto-config"
);
request.setPathParam("app_id", appId);
request.setPathParam("endpoint_id", endpointId);
request.setBody(SubscribeInSerializer._toJsonObject(subscribeIn));
return request.send(this.requestCtx, EndpointOutSerializer._fromJsonObject);
}
}