@glideidentity/glide-be-sdk-node-core 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +4 -0
- package/README.md +35 -0
- package/dist/constants.d.ts +65 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +62 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/types.d.ts +184 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +10 -0
- package/package.json +26 -0
package/LICENSE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @glideidentity/glide-be-sdk-node-core
|
|
2
|
+
|
|
3
|
+
Core types and constants for Glide Node.js SDK.
|
|
4
|
+
|
|
5
|
+
**Documentation**: https://docs.glideidentity.com
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @glideidentity/glide-be-sdk-node-core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { UseCase, ErrorCode, AuthenticationStrategy } from '@glideidentity/glide-be-sdk-node-core';
|
|
17
|
+
import type { PrepareRequest, PrepareResponse, SessionInfo } from '@glideidentity/glide-be-sdk-node-core';
|
|
18
|
+
|
|
19
|
+
const request: PrepareRequest = {
|
|
20
|
+
use_case: UseCase.VERIFY_PHONE_NUMBER,
|
|
21
|
+
phone_number: '+14155551234'
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Full SDK
|
|
26
|
+
|
|
27
|
+
For HTTP client and logging, use the full SDK:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install @glideidentity/glide-be-sdk-node
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
|
|
35
|
+
Copyright (c) Glide Identity Inc.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** Authentication use case. */
|
|
2
|
+
export declare const UseCase: {
|
|
3
|
+
/** Retrieve the user's phone number from the device. */
|
|
4
|
+
readonly GET_PHONE_NUMBER: "GetPhoneNumber";
|
|
5
|
+
/** Verify a specific phone number matches the device. */
|
|
6
|
+
readonly VERIFY_PHONE_NUMBER: "VerifyPhoneNumber";
|
|
7
|
+
};
|
|
8
|
+
export type UseCaseType = typeof UseCase[keyof typeof UseCase];
|
|
9
|
+
/** Authentication strategy determined by carrier and device capabilities. */
|
|
10
|
+
export declare const AuthenticationStrategy: {
|
|
11
|
+
/** Direct carrier authentication (TS.43). */
|
|
12
|
+
readonly TS43: "ts43";
|
|
13
|
+
/** Link-based authentication for cross-device flows. */
|
|
14
|
+
readonly LINK: "link";
|
|
15
|
+
/** QR code authentication for desktop browsers. */
|
|
16
|
+
readonly DESKTOP: "desktop";
|
|
17
|
+
};
|
|
18
|
+
export type AuthenticationStrategyType = typeof AuthenticationStrategy[keyof typeof AuthenticationStrategy];
|
|
19
|
+
/** Error codes returned by the API. */
|
|
20
|
+
export declare const ErrorCode: {
|
|
21
|
+
readonly INVALID_PHONE_NUMBER: "INVALID_PHONE_NUMBER";
|
|
22
|
+
readonly MISSING_REQUIRED_FIELD: "MISSING_REQUIRED_FIELD";
|
|
23
|
+
readonly INVALID_USE_CASE: "INVALID_USE_CASE";
|
|
24
|
+
readonly INVALID_SESSION: "INVALID_SESSION";
|
|
25
|
+
readonly SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
|
|
26
|
+
readonly SESSION_EXPIRED: "SESSION_EXPIRED";
|
|
27
|
+
readonly CARRIER_NOT_ELIGIBLE: "CARRIER_NOT_ELIGIBLE";
|
|
28
|
+
readonly UNSUPPORTED_PLATFORM: "UNSUPPORTED_PLATFORM";
|
|
29
|
+
readonly PHONE_NUMBER_MISMATCH: "PHONE_NUMBER_MISMATCH";
|
|
30
|
+
readonly INVALID_CREDENTIAL: "INVALID_CREDENTIAL";
|
|
31
|
+
readonly INVALID_CREDENTIAL_FORMAT: "INVALID_CREDENTIAL_FORMAT";
|
|
32
|
+
readonly VERIFICATION_FAILED: "VERIFICATION_FAILED";
|
|
33
|
+
readonly UNPROCESSABLE_ENTITY: "UNPROCESSABLE_ENTITY";
|
|
34
|
+
readonly RATE_LIMIT_EXCEEDED: "RATE_LIMIT_EXCEEDED";
|
|
35
|
+
readonly INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR";
|
|
36
|
+
readonly SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE";
|
|
37
|
+
/** OAuth2 authentication failed (invalid client credentials, token endpoint error). */
|
|
38
|
+
readonly AUTHENTICATION_FAILED: "AUTHENTICATION_FAILED";
|
|
39
|
+
};
|
|
40
|
+
export type ErrorCodeType = typeof ErrorCode[keyof typeof ErrorCode];
|
|
41
|
+
/** SIM swap risk level values. */
|
|
42
|
+
export declare const SimSwapRiskLevel: {
|
|
43
|
+
/** SIM changed within last 7 days - high fraud risk. */
|
|
44
|
+
readonly HIGH: "RISK_LEVEL_HIGH";
|
|
45
|
+
/** SIM changed within 7-30 days - medium fraud risk. */
|
|
46
|
+
readonly MEDIUM: "RISK_LEVEL_MEDIUM";
|
|
47
|
+
/** SIM changed more than 30 days ago - low fraud risk. */
|
|
48
|
+
readonly LOW: "RISK_LEVEL_LOW";
|
|
49
|
+
/** Risk could not be determined. */
|
|
50
|
+
readonly UNKNOWN: "RISK_LEVEL_UNKNOWN";
|
|
51
|
+
};
|
|
52
|
+
export type SimSwapRiskLevelType = typeof SimSwapRiskLevel[keyof typeof SimSwapRiskLevel];
|
|
53
|
+
/** SIM swap check failure reasons. */
|
|
54
|
+
export declare const SimSwapFailureReason: {
|
|
55
|
+
/** SIM swap service timed out. */
|
|
56
|
+
readonly TIMEOUT: "timeout";
|
|
57
|
+
/** Carrier doesn't support SIM swap checking. */
|
|
58
|
+
readonly CARRIER_NOT_SUPPORTED: "carrier_not_supported";
|
|
59
|
+
/** SIM swap checking is disabled for this app. */
|
|
60
|
+
readonly DISABLED: "disabled";
|
|
61
|
+
/** An error occurred during the check. */
|
|
62
|
+
readonly ERROR: "error";
|
|
63
|
+
};
|
|
64
|
+
export type SimSwapFailureReasonType = typeof SimSwapFailureReason[keyof typeof SimSwapFailureReason];
|
|
65
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,eAAO,MAAM,OAAO;IAChB,wDAAwD;;IAExD,yDAAyD;;CAEnD,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,OAAO,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AAE/D,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB;IAC/B,6CAA6C;;IAE7C,wDAAwD;;IAExD,mDAAmD;;CAE7C,CAAC;AAEX,MAAM,MAAM,0BAA0B,GAAG,OAAO,sBAAsB,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAE5G,uCAAuC;AACvC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;IAiBlB,uFAAuF;;CAEjF,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAErE,kCAAkC;AAClC,eAAO,MAAM,gBAAgB;IACzB,wDAAwD;;IAExD,wDAAwD;;IAExD,0DAA0D;;IAE1D,oCAAoC;;CAE9B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,OAAO,gBAAgB,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE1F,sCAAsC;AACtC,eAAO,MAAM,oBAAoB;IAC7B,kCAAkC;;IAElC,iDAAiD;;IAEjD,kDAAkD;;IAElD,0CAA0C;;CAEpC,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,OAAO,oBAAoB,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimSwapFailureReason = exports.SimSwapRiskLevel = exports.ErrorCode = exports.AuthenticationStrategy = exports.UseCase = void 0;
|
|
4
|
+
/** Authentication use case. */
|
|
5
|
+
exports.UseCase = {
|
|
6
|
+
/** Retrieve the user's phone number from the device. */
|
|
7
|
+
GET_PHONE_NUMBER: 'GetPhoneNumber',
|
|
8
|
+
/** Verify a specific phone number matches the device. */
|
|
9
|
+
VERIFY_PHONE_NUMBER: 'VerifyPhoneNumber'
|
|
10
|
+
};
|
|
11
|
+
/** Authentication strategy determined by carrier and device capabilities. */
|
|
12
|
+
exports.AuthenticationStrategy = {
|
|
13
|
+
/** Direct carrier authentication (TS.43). */
|
|
14
|
+
TS43: 'ts43',
|
|
15
|
+
/** Link-based authentication for cross-device flows. */
|
|
16
|
+
LINK: 'link',
|
|
17
|
+
/** QR code authentication for desktop browsers. */
|
|
18
|
+
DESKTOP: 'desktop'
|
|
19
|
+
};
|
|
20
|
+
/** Error codes returned by the API. */
|
|
21
|
+
exports.ErrorCode = {
|
|
22
|
+
INVALID_PHONE_NUMBER: 'INVALID_PHONE_NUMBER',
|
|
23
|
+
MISSING_REQUIRED_FIELD: 'MISSING_REQUIRED_FIELD',
|
|
24
|
+
INVALID_USE_CASE: 'INVALID_USE_CASE',
|
|
25
|
+
INVALID_SESSION: 'INVALID_SESSION',
|
|
26
|
+
SESSION_NOT_FOUND: 'SESSION_NOT_FOUND',
|
|
27
|
+
SESSION_EXPIRED: 'SESSION_EXPIRED',
|
|
28
|
+
CARRIER_NOT_ELIGIBLE: 'CARRIER_NOT_ELIGIBLE',
|
|
29
|
+
UNSUPPORTED_PLATFORM: 'UNSUPPORTED_PLATFORM',
|
|
30
|
+
PHONE_NUMBER_MISMATCH: 'PHONE_NUMBER_MISMATCH',
|
|
31
|
+
INVALID_CREDENTIAL: 'INVALID_CREDENTIAL',
|
|
32
|
+
INVALID_CREDENTIAL_FORMAT: 'INVALID_CREDENTIAL_FORMAT',
|
|
33
|
+
VERIFICATION_FAILED: 'VERIFICATION_FAILED',
|
|
34
|
+
UNPROCESSABLE_ENTITY: 'UNPROCESSABLE_ENTITY',
|
|
35
|
+
RATE_LIMIT_EXCEEDED: 'RATE_LIMIT_EXCEEDED',
|
|
36
|
+
INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR',
|
|
37
|
+
SERVICE_UNAVAILABLE: 'SERVICE_UNAVAILABLE',
|
|
38
|
+
/** OAuth2 authentication failed (invalid client credentials, token endpoint error). */
|
|
39
|
+
AUTHENTICATION_FAILED: 'AUTHENTICATION_FAILED'
|
|
40
|
+
};
|
|
41
|
+
/** SIM swap risk level values. */
|
|
42
|
+
exports.SimSwapRiskLevel = {
|
|
43
|
+
/** SIM changed within last 7 days - high fraud risk. */
|
|
44
|
+
HIGH: 'RISK_LEVEL_HIGH',
|
|
45
|
+
/** SIM changed within 7-30 days - medium fraud risk. */
|
|
46
|
+
MEDIUM: 'RISK_LEVEL_MEDIUM',
|
|
47
|
+
/** SIM changed more than 30 days ago - low fraud risk. */
|
|
48
|
+
LOW: 'RISK_LEVEL_LOW',
|
|
49
|
+
/** Risk could not be determined. */
|
|
50
|
+
UNKNOWN: 'RISK_LEVEL_UNKNOWN'
|
|
51
|
+
};
|
|
52
|
+
/** SIM swap check failure reasons. */
|
|
53
|
+
exports.SimSwapFailureReason = {
|
|
54
|
+
/** SIM swap service timed out. */
|
|
55
|
+
TIMEOUT: 'timeout',
|
|
56
|
+
/** Carrier doesn't support SIM swap checking. */
|
|
57
|
+
CARRIER_NOT_SUPPORTED: 'carrier_not_supported',
|
|
58
|
+
/** SIM swap checking is disabled for this app. */
|
|
59
|
+
DISABLED: 'disabled',
|
|
60
|
+
/** An error occurred during the check. */
|
|
61
|
+
ERROR: 'error'
|
|
62
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
__exportStar(require("./version"), exports);
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { UseCaseType, AuthenticationStrategyType, SimSwapRiskLevelType, SimSwapFailureReasonType } from './constants';
|
|
2
|
+
/** Mobile network identifiers (MCC + MNC). */
|
|
3
|
+
export interface PLMN {
|
|
4
|
+
/** Mobile Country Code (3 digits). */
|
|
5
|
+
mcc: string;
|
|
6
|
+
/** Mobile Network Code (2-3 digits). */
|
|
7
|
+
mnc: string;
|
|
8
|
+
}
|
|
9
|
+
/** User consent information. */
|
|
10
|
+
export interface ConsentData {
|
|
11
|
+
consent_text: string;
|
|
12
|
+
policy_link: string;
|
|
13
|
+
policy_text?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Client device information. */
|
|
16
|
+
export interface ClientInfo {
|
|
17
|
+
user_agent?: string;
|
|
18
|
+
platform?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Authentication session. */
|
|
21
|
+
export interface SessionInfo {
|
|
22
|
+
session_key: string;
|
|
23
|
+
nonce?: string;
|
|
24
|
+
metadata?: Record<string, string>;
|
|
25
|
+
}
|
|
26
|
+
/** Visual verification challenge for desktop QR authentication. */
|
|
27
|
+
export interface Challenge {
|
|
28
|
+
pattern: string;
|
|
29
|
+
color: string;
|
|
30
|
+
session_id: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* TS43 strategy data.
|
|
34
|
+
* Used for Android Digital Credentials API.
|
|
35
|
+
*/
|
|
36
|
+
export interface TS43Data {
|
|
37
|
+
/** Protocol identifier (e.g., 'openid4vp-v1-unsigned') */
|
|
38
|
+
protocol: string;
|
|
39
|
+
/** Protocol-specific data for Digital Credentials API */
|
|
40
|
+
data: {
|
|
41
|
+
nonce: string;
|
|
42
|
+
response_mode: string;
|
|
43
|
+
response_type: string;
|
|
44
|
+
dcql_query: {
|
|
45
|
+
credentials: Array<{
|
|
46
|
+
id: string;
|
|
47
|
+
format: string;
|
|
48
|
+
meta: {
|
|
49
|
+
vct_values: string[];
|
|
50
|
+
credential_authorization_jwt: string;
|
|
51
|
+
};
|
|
52
|
+
claims?: string[];
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Link strategy data.
|
|
59
|
+
* Used for iOS App Clips and OAuth redirects.
|
|
60
|
+
*/
|
|
61
|
+
export interface LinkData {
|
|
62
|
+
/** URL to redirect user to (App Clip or OAuth) */
|
|
63
|
+
url: string;
|
|
64
|
+
/** URL to return to after authentication */
|
|
65
|
+
return_url?: string;
|
|
66
|
+
/** Status URL for polling authentication status */
|
|
67
|
+
status_url?: string;
|
|
68
|
+
/** Additional parameters */
|
|
69
|
+
params?: Record<string, string>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Desktop strategy data.
|
|
73
|
+
* Used for QR code-based authentication from desktop browsers.
|
|
74
|
+
*/
|
|
75
|
+
export interface DesktopData {
|
|
76
|
+
/** Protocol version for QR authentication (e.g., 'qr-auth-v1') */
|
|
77
|
+
protocol?: string;
|
|
78
|
+
/** QR code and authentication data */
|
|
79
|
+
data: {
|
|
80
|
+
/** Unique session identifier for the QR code */
|
|
81
|
+
session_id?: string;
|
|
82
|
+
/** iOS-specific QR code image as base64 data URI */
|
|
83
|
+
ios_qr_image?: string;
|
|
84
|
+
/** Android-specific QR code image as base64 data URI */
|
|
85
|
+
android_qr_image?: string;
|
|
86
|
+
/** iOS authentication URL */
|
|
87
|
+
ios_url?: string;
|
|
88
|
+
/** Android authentication URL */
|
|
89
|
+
android_url?: string;
|
|
90
|
+
/** Status polling URL */
|
|
91
|
+
status_url?: string;
|
|
92
|
+
/** Visual verification challenge (matches top-level challenge) */
|
|
93
|
+
challenge?: Challenge;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/** Union type for all strategy-specific data */
|
|
97
|
+
export type PrepareResponseData = TS43Data | LinkData | DesktopData;
|
|
98
|
+
/** SIM swap detection information for fraud risk assessment. */
|
|
99
|
+
export interface SimSwapInfo {
|
|
100
|
+
/** Whether the SIM swap check completed successfully. */
|
|
101
|
+
checked: boolean;
|
|
102
|
+
/** Fraud risk level based on SIM swap recency. */
|
|
103
|
+
risk_level?: SimSwapRiskLevelType;
|
|
104
|
+
/** Human-readable time since last SIM change. */
|
|
105
|
+
age_band?: string;
|
|
106
|
+
/** Carrier that performed the check. */
|
|
107
|
+
carrier_name?: string;
|
|
108
|
+
/** When the SIM swap check was performed (RFC3339). */
|
|
109
|
+
checked_at?: string;
|
|
110
|
+
/** Reason for check failure (only when checked=false). */
|
|
111
|
+
reason?: SimSwapFailureReasonType;
|
|
112
|
+
}
|
|
113
|
+
/** Options for prepare request. */
|
|
114
|
+
export interface PrepareOptions {
|
|
115
|
+
parent_session_id?: string;
|
|
116
|
+
theme?: 'dark' | 'light';
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Request to initialize the authentication flow.
|
|
120
|
+
* Tip: Call ahead of user interaction to minimize wait time during authentication.
|
|
121
|
+
*/
|
|
122
|
+
export interface PrepareRequest {
|
|
123
|
+
use_case?: UseCaseType;
|
|
124
|
+
/** Phone number in E.164 format. Required for VerifyPhoneNumber. */
|
|
125
|
+
phone_number?: string;
|
|
126
|
+
/** Network identifiers. Required for GetPhoneNumber. */
|
|
127
|
+
plmn?: PLMN;
|
|
128
|
+
nonce?: string;
|
|
129
|
+
consent_data?: ConsentData;
|
|
130
|
+
client_info?: ClientInfo;
|
|
131
|
+
options?: PrepareOptions;
|
|
132
|
+
}
|
|
133
|
+
/** Response from prepare request. */
|
|
134
|
+
export interface PrepareResponse {
|
|
135
|
+
authentication_strategy: AuthenticationStrategyType;
|
|
136
|
+
session: SessionInfo;
|
|
137
|
+
/** Strategy-specific data (TS43Data, LinkData, or DesktopData) */
|
|
138
|
+
data: PrepareResponseData;
|
|
139
|
+
challenge?: Challenge;
|
|
140
|
+
}
|
|
141
|
+
/** Request to verify phone number ownership. */
|
|
142
|
+
export interface VerifyPhoneNumberRequest {
|
|
143
|
+
session: SessionInfo;
|
|
144
|
+
credential: string;
|
|
145
|
+
}
|
|
146
|
+
/** Response from phone number verification. */
|
|
147
|
+
export interface VerifyPhoneNumberResponse {
|
|
148
|
+
phone_number: string;
|
|
149
|
+
verified: boolean;
|
|
150
|
+
aud?: string;
|
|
151
|
+
/** SIM swap detection information for fraud risk assessment. */
|
|
152
|
+
sim_swap?: SimSwapInfo;
|
|
153
|
+
}
|
|
154
|
+
/** Request to retrieve phone number. */
|
|
155
|
+
export interface GetPhoneNumberRequest {
|
|
156
|
+
session: SessionInfo;
|
|
157
|
+
credential: string;
|
|
158
|
+
}
|
|
159
|
+
/** Response from phone number retrieval. */
|
|
160
|
+
export interface GetPhoneNumberResponse {
|
|
161
|
+
phone_number: string;
|
|
162
|
+
aud?: string;
|
|
163
|
+
/** SIM swap detection information for fraud risk assessment. */
|
|
164
|
+
sim_swap?: SimSwapInfo;
|
|
165
|
+
}
|
|
166
|
+
/** Process request. */
|
|
167
|
+
export interface ProcessRequest {
|
|
168
|
+
credential: string;
|
|
169
|
+
session: SessionInfo;
|
|
170
|
+
use_case: UseCaseType;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Request to report that an authentication flow was started.
|
|
174
|
+
*/
|
|
175
|
+
export interface ReportInvocationRequest {
|
|
176
|
+
session_id: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Response from reporting an authentication invocation.
|
|
180
|
+
*/
|
|
181
|
+
export interface ReportInvocationResponse {
|
|
182
|
+
success: boolean;
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEtH,8CAA8C;AAC9C,MAAM,WAAW,IAAI;IACjB,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;CACf;AAED,gCAAgC;AAChC,MAAM,WAAW,WAAW;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,iCAAiC;A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ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,eAAO,MAAM,OAAO,UAAU,CAAC;AAE/B,sCAAsC;AACtC,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VERSION = void 0;
|
|
4
|
+
exports.getVersion = getVersion;
|
|
5
|
+
/** SDK version. */
|
|
6
|
+
exports.VERSION = '1.0.0';
|
|
7
|
+
/** Returns the SDK version string. */
|
|
8
|
+
function getVersion() {
|
|
9
|
+
return exports.VERSION;
|
|
10
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@glideidentity/glide-be-sdk-node-core",
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "Core types and constants for Glide Node.js SDK",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/**/*",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"clean": "rm -rf dist"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {},
|
|
24
|
+
"keywords": ["glide", "sdk", "phone", "verification", "types"],
|
|
25
|
+
"license": "SEE LICENSE IN LICENSE"
|
|
26
|
+
}
|