-
Notifications
You must be signed in to change notification settings - Fork 0
/
exists.ts
57 lines (50 loc) · 1.55 KB
/
exists.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
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import * as Core from '../../core';
import { APIResource } from '../../resource';
import * as ExistsAPI from './exists';
export class Exists extends APIResource {
/**
* Determine whether or not an identifier is associated with an existing Bolt
* account.
*/
list(params: ExistListParams, options?: Core.RequestOptions): Core.APIPromise<void> {
const { 'X-Publishable-Key': xPublishableKey, ...query } = params;
return this._client.get('/account/exists', {
query,
...options,
headers: { Accept: '*/*', 'X-Publishable-Key': xPublishableKey, ...options?.headers },
});
}
}
export interface ExistListParams {
/**
* Query param: A type and value combination that defines the identifier used to
* detect the existence of an account.
*/
identifier: ExistListParams.Identifier;
/**
* Header param: The publicly viewable identifier used to identify a merchant
* division.
*/
'X-Publishable-Key': string;
}
export namespace ExistListParams {
/**
* A type and value combination that defines the identifier used to detect the
* existence of an account.
*/
export interface Identifier {
/**
* The type of identifier
*/
identifier_type: 'email' | 'email_sha256';
/**
* The value of the identifier. The value must be valid for the specified
* `identifier_type`
*/
identifier_value: string;
}
}
export namespace Exists {
export import ExistListParams = ExistsAPI.ExistListParams;
}