-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathresponder-endpoints.ts
89 lines (77 loc) · 2.42 KB
/
responder-endpoints.ts
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import * as Core from '../core';
export class ResponderEndpoints extends APIResource {
/**
* Enroll a responder endpoint
*/
create(
body: ResponderEndpointCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<ResponderEndpointCreateResponse> {
return this._client.post('/v1/responder_endpoints', { body, ...options });
}
/**
* Disenroll a responder endpoint
*/
del(params: ResponderEndpointDeleteParams, options?: Core.RequestOptions): Core.APIPromise<void> {
const { type } = params;
return this._client.delete('/v1/responder_endpoints', { query: { type }, ...options });
}
/**
* Check the status of a responder endpoint
*/
checkStatus(
query: ResponderEndpointCheckStatusParams,
options?: Core.RequestOptions,
): Core.APIPromise<ResponderEndpointStatus> {
return this._client.get('/v1/responder_endpoints', { query, ...options });
}
}
export interface ResponderEndpointStatus {
/**
* True if the instance has an endpoint enrolled.
*/
enrolled?: boolean;
/**
* The URL of the currently enrolled endpoint or null.
*/
url?: string | null;
}
export interface ResponderEndpointCreateResponse {
/**
* True if the endpoint was enrolled successfully.
*/
enrolled?: boolean;
}
export interface ResponderEndpointCreateParams {
/**
* The type of the endpoint.
*/
type?: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING';
/**
* The URL for the responder endpoint (must be http(s)).
*/
url?: string;
}
export interface ResponderEndpointDeleteParams {
/**
* The type of the endpoint.
*/
type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING';
}
export interface ResponderEndpointCheckStatusParams {
/**
* The type of the endpoint.
*/
type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING';
}
export declare namespace ResponderEndpoints {
export {
type ResponderEndpointStatus as ResponderEndpointStatus,
type ResponderEndpointCreateResponse as ResponderEndpointCreateResponse,
type ResponderEndpointCreateParams as ResponderEndpointCreateParams,
type ResponderEndpointDeleteParams as ResponderEndpointDeleteParams,
type ResponderEndpointCheckStatusParams as ResponderEndpointCheckStatusParams,
};
}