Skip to content

Commit 2dd497e

Browse files
committed
fix: run prettier
1 parent 6abe993 commit 2dd497e

21 files changed

+74
-125
lines changed

packages/identity-insights/__tests__/__dataSets__/post.ts

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const params = {
1515
originalCarrier: {},
1616
currentCarrier: {},
1717
simSwap: {
18-
period: 240
18+
period: 240,
1919
},
2020
roaming: {},
2121
reachability: {},
@@ -30,14 +30,14 @@ const identityInsights = {
3030
countryName: 'United States',
3131
countryPrefix: '1',
3232
offlineLocation: 'Georgia',
33-
timeZones: [ 'America/New_York' ],
33+
timeZones: ['America/New_York'],
3434
numberInternational: '+14040000000',
3535
numberNational: '(404) 000-0000',
3636
isFormatValid: true,
3737
status: {
3838
code: Status.OK,
39-
message: 'Success'
40-
}
39+
message: 'Success',
40+
},
4141
},
4242
originalCarrier: {
4343
name: 'Orange Espana, S.A. Unipersonal',
@@ -46,8 +46,8 @@ const identityInsights = {
4646
networkCode: '21403',
4747
status: {
4848
code: Status.OK,
49-
message: 'Success'
50-
}
49+
message: 'Success',
50+
},
5151
},
5252
currentCarrier: {
5353
name: 'Orange Espana, S.A. Unipersonal',
@@ -56,34 +56,34 @@ const identityInsights = {
5656
networkCode: '21403',
5757
status: {
5858
code: Status.OK,
59-
message: 'Success'
60-
}
59+
message: 'Success',
60+
},
6161
},
6262
simSwap: {
6363
latestSimSwapAt: '2024-07-08T09:30:27.504Z',
6464
isSwapped: true,
6565
status: {
6666
code: Status.OK,
67-
message: 'Success'
68-
}
67+
message: 'Success',
68+
},
6969
},
7070
roaming: {
7171
latestStatusAt: '2025-10-11T08:23:23.456',
7272
isRoaming: true,
73-
countryCodes : [ "ES" ],
73+
countryCodes: ['ES'],
7474
status: {
7575
code: Status.OK,
76-
message: 'Success'
77-
}
76+
message: 'Success',
77+
},
7878
},
7979
reachability: {
8080
latestStatusAt: '2025-10-11T08:23:23.456',
8181
isReachable: true,
82-
connectivity: [ Connectivity.DATA ],
82+
connectivity: [Connectivity.DATA],
8383
status: {
8484
code: Status.OK,
85-
message: 'Success'
86-
}
85+
message: 'Success',
86+
},
8787
},
8888
},
8989
} as IdentityInsightsType;
@@ -96,22 +96,22 @@ const response = {
9696
country_name: 'United States',
9797
country_prefix: '1',
9898
offline_location: 'Georgia',
99-
time_zones: [ 'America/New_York' ],
99+
time_zones: ['America/New_York'],
100100
number_international: '+14040000000',
101101
number_national: '(404) 000-0000',
102102
is_format_valid: true,
103103
status: {
104104
code: Status.OK,
105-
message: 'Success'
106-
}
105+
message: 'Success',
106+
},
107107
},
108108
sim_swap: {
109109
latest_sim_swap_at: '2024-07-08T09:30:27.504Z',
110110
is_swapped: true,
111111
status: {
112112
code: Status.OK,
113-
message: 'Success'
114-
}
113+
message: 'Success',
114+
},
115115
},
116116
originalCarrier: {
117117
name: 'Orange Espana, S.A. Unipersonal',
@@ -120,8 +120,8 @@ const response = {
120120
networkCode: '21403',
121121
status: {
122122
code: Status.OK,
123-
message: 'Success'
124-
}
123+
message: 'Success',
124+
},
125125
},
126126
currentCarrier: {
127127
name: 'Orange Espana, S.A. Unipersonal',
@@ -130,26 +130,26 @@ const response = {
130130
networkCode: '21403',
131131
status: {
132132
code: Status.OK,
133-
message: 'Success'
134-
}
133+
message: 'Success',
134+
},
135135
},
136136
roaming: {
137137
latestStatusAt: '2025-10-11T08:23:23.456',
138138
isRoaming: true,
139-
countryCodes : [ "ES" ],
139+
countryCodes: ['ES'],
140140
status: {
141141
code: Status.OK,
142-
message: 'Success'
143-
}
142+
message: 'Success',
143+
},
144144
},
145145
reachability: {
146146
latestStatusAt: '2025-10-11T08:23:23.456',
147147
isReachable: true,
148-
connectivity: [ Connectivity.DATA ],
148+
connectivity: [Connectivity.DATA],
149149
status: {
150150
code: Status.OK,
151-
message: 'Success'
152-
}
151+
message: 'Success',
152+
},
153153
},
154154
},
155155
} as IdentityInsightsResponse;

packages/identity-insights/__tests__/identityInsights.test.ts

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,31 @@ import {
1111
keyAuth,
1212
} from '../../../testHelpers';
1313

14-
const applicationsTest = testDataSets.map((dataSet): TestTuple<IdentityInsights> => {
15-
const { label, tests } = dataSet;
14+
const applicationsTest = testDataSets.map(
15+
(dataSet): TestTuple<IdentityInsights> => {
16+
const { label, tests } = dataSet;
1617

17-
return {
18-
name: label,
19-
tests: tests.map((test): SDKTestCase<IdentityInsights> => {
20-
return {
21-
label: test.label,
22-
baseUrl: 'https://api-eu.vonage.com',
23-
reqHeaders: {
24-
authorization: validateBearerAuth,
25-
},
26-
requests: test.requests as TestRequest[],
27-
responses: test.responses as TestResponse[],
28-
client: new IdentityInsights(keyAuth),
29-
clientMethod: test.clientMethod as keyof IdentityInsights,
30-
parameters: test.parameters,
31-
generator: test.generator || false,
32-
error: test.error || false,
33-
expected: test.expected,
34-
};
35-
}),
36-
};
37-
});
18+
return {
19+
name: label,
20+
tests: tests.map((test): SDKTestCase<IdentityInsights> => {
21+
return {
22+
label: test.label,
23+
baseUrl: 'https://api-eu.vonage.com',
24+
reqHeaders: {
25+
authorization: validateBearerAuth,
26+
},
27+
requests: test.requests as TestRequest[],
28+
responses: test.responses as TestResponse[],
29+
client: new IdentityInsights(keyAuth),
30+
clientMethod: test.clientMethod as keyof IdentityInsights,
31+
parameters: test.parameters,
32+
generator: test.generator || false,
33+
error: test.error || false,
34+
expected: test.expected,
35+
};
36+
}),
37+
};
38+
}
39+
);
3840

3941
VonageTest(applicationsTest);

packages/identity-insights/lib/enums/codeStatus.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Enum representing the possible status values for an insight.
33
*/
44
export enum Status {
5-
65
/**
76
* The country or mobile network is not supported by available suppliers.
87
*/
@@ -50,7 +49,6 @@ export enum Status {
5049
}
5150

5251
export enum SubscriberMatchStatus {
53-
5452
/**
5553
* Operator requires idDocument to match any other attributes.
5654
*/
@@ -65,5 +63,4 @@ export enum SubscriberMatchStatus {
6563
* Indicated parameter combination is invalid.
6664
*/
6765
SUBSCRIBER_MATCH_INVALID_PARAM_COMBINATION = 'subscriber_match.invalid_param_combination',
68-
6966
}

packages/identity-insights/lib/enums/connectivity.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Enum representing the connectivty type
33
*/
44
export enum Connectivity {
5-
65
/**
76
* Device is connected to the newtork for data
87
*/
@@ -12,5 +11,4 @@ export enum Connectivity {
1211
* Device is connected to the newtork for sms
1312
*/
1413
SMS = 'sms',
15-
1614
}

packages/identity-insights/lib/enums/locationVerified.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Enum representing the result of the location verification request
33
*/
44
export enum LocationVerified {
5-
65
/**
76
* The network locates the device within the requested area,
87
*/
@@ -21,6 +20,5 @@ export enum LocationVerified {
2120
/**
2221
* The requested area partially match the area where the network locates the device.
2322
*/
24-
PARTIAL = 'partial',
25-
26-
};
23+
PARTIAL = 'partial',
24+
}

packages/identity-insights/lib/enums/match.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Enum representing the possible status values for the subscriber match fields
33
*/
44
export enum Match {
5-
65
/**
76
* The value provided matches exactly.
87
*/
@@ -32,14 +31,11 @@ export enum Match {
3231
* There is no data held for the request attribute.
3332
*/
3433
DATA_UNAVAILABLE = 'data_unavailable',
35-
3634
}
3735

3836
export enum MatchAddress {
39-
4037
/**
4138
* The value provided matches with part of the address
4239
*/
4340
INCLUDED_WITH_ADDRESS_MATCH = 'included_with_address_match',
4441
}
45-

packages/identity-insights/lib/enums/networkType.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* number
44
*/
55
export enum NetworkType {
6-
76
/**
87
* Mobile Network Type.
98
*/
@@ -28,5 +27,4 @@ export enum NetworkType {
2827
* Virtual Network Type
2928
*/
3029
VIRTUAL = 'virtual',
31-
32-
};
30+
}
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import { Client, AuthenticationType } from '@vonage/server-client';
2-
import { IdentityInsightsType, IdentityInsightsParameters, IdentityInsightsResponse } from './types/index.js';
2+
import {
3+
IdentityInsightsType,
4+
IdentityInsightsParameters,
5+
IdentityInsightsResponse,
6+
} from './types/index.js';
37

48
/**
59
* The Identity Insights API allows clients to request real-time information related
610
* to a phone number.
711
* This class represents the client for retrieving phone insights.
812
*/
913
export class IdentityInsights extends Client {
10-
1114
/**
1215
* The authentication type used for this client (JWT).
1316
*/
1417
protected authType = AuthenticationType.JWT;
1518

16-
1719
/**
1820
* Retrieve Identity Insights from a given phone number
1921
*
@@ -22,15 +24,17 @@ export class IdentityInsights extends Client {
2224
* @return {IdentityInsightsType} A `IdentityInsightsType` containing the insights
2325
* requested.
2426
*/
25-
async getIdentityInsights (params: IdentityInsightsParameters): Promise<IdentityInsightsType> {
27+
async getIdentityInsights(
28+
params: IdentityInsightsParameters
29+
): Promise<IdentityInsightsType> {
2630
const resp = await this.sendPostRequest<IdentityInsightsResponse>(
2731
`${this.config.identityInsightsHost}/v0.1/identity-insights`,
28-
params,
32+
params
2933
);
3034

3135
return Client.transformers.camelCaseObjectKeys(
3236
resp?.data,
33-
true,
37+
true
3438
) as IdentityInsightsType;
3539
}
3640
}

packages/identity-insights/lib/types/carrier.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@ export type Carrier = {
2828
* Mobile country codes (MCC) + Mobile network codes (MNC)
2929
*/
3030
networkCode?: string;
31-
3231
};

packages/identity-insights/lib/types/format.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { StatusType } from './status.js';
44
* Represents the result of the format insight.
55
*/
66
export type Format = {
7-
87
/**
98
* The status of the insight call.
109
*/
@@ -50,5 +49,4 @@ export type Format = {
5049
* Phone number format validation involves verifying the length and prefix details at various levels
5150
*/
5251
isFormatValid?: boolean;
53-
5452
};

0 commit comments

Comments
 (0)