@sinch/verification 1.3.0 → 1.4.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/dist/models/v1/enums.d.ts +11 -2
- package/dist/models/v1/flashcall-verification-report-response/flashcall-verification-report-response.d.ts +3 -3
- package/dist/models/v1/helper.d.ts +33 -4
- package/dist/models/v1/helper.js +77 -12
- package/dist/models/v1/helper.js.map +1 -1
- package/dist/models/v1/index.d.ts +3 -0
- package/dist/models/v1/index.js +4 -0
- package/dist/models/v1/index.js.map +1 -1
- package/dist/models/v1/mod-callbacks/flashcall-request-event-response/flashcall-request-event-response.d.ts +6 -3
- package/dist/models/v1/mod-callbacks/index.d.ts +1 -1
- package/dist/models/v1/mod-callbacks/index.js +1 -1
- package/dist/models/v1/mod-callbacks/index.js.map +1 -1
- package/dist/models/v1/mod-callbacks/phonecall-request-event-response/phonecall-request-event-response.d.ts +2 -1
- package/dist/models/v1/mod-callbacks/sms-request-event-response/sms-request-event-response.d.ts +7 -2
- package/dist/models/v1/mod-callbacks/verification-request-event/verification-request-event.d.ts +1 -1
- package/dist/models/v1/mod-callbacks/verification-request-event-response/verification-request-event-response.d.ts +3 -2
- package/dist/models/v1/mod-callbacks/verification-result-event/verification-result-event.d.ts +1 -1
- package/dist/models/v1/mod-callbacks/whatsapp-request-event-response/index.d.ts +1 -0
- package/dist/models/v1/mod-callbacks/whatsapp-request-event-response/index.js.map +1 -0
- package/dist/models/v1/mod-callbacks/whatsapp-request-event-response/whatsapp-request-event-response.d.ts +14 -0
- package/dist/models/v1/mod-callbacks/{verification-result-event-response/verification-result-event-response.js → whatsapp-request-event-response/whatsapp-request-event-response.js} +1 -1
- package/dist/models/v1/mod-callbacks/whatsapp-request-event-response/whatsapp-request-event-response.js.map +1 -0
- package/dist/models/v1/phonecall-verification-report-response/phonecall-verification-report-response.d.ts +3 -3
- package/dist/models/v1/requests/verification-status/verification-status-request-data.d.ts +1 -1
- package/dist/models/v1/requests/verifications/verifications-request-data.d.ts +14 -2
- package/dist/models/v1/sms-verification-report-response/sms-verification-report-response.d.ts +3 -3
- package/dist/models/v1/start-flashcall-verification-response/start-flashcall-verification-response.d.ts +5 -4
- package/dist/models/v1/start-sms-verification-response/start-sms-verification-response.d.ts +5 -1
- package/dist/models/v1/start-verification-request/index.d.ts +1 -1
- package/dist/models/v1/start-verification-request/start-verification-request.d.ts +20 -8
- package/dist/models/v1/start-whatsapp-verification-response/index.d.ts +1 -0
- package/dist/models/v1/start-whatsapp-verification-response/index.js +3 -0
- package/dist/models/v1/start-whatsapp-verification-response/index.js.map +1 -0
- package/dist/models/v1/start-whatsapp-verification-response/start-whatsapp-verification-response.d.ts +18 -0
- package/dist/models/v1/start-whatsapp-verification-response/start-whatsapp-verification-response.js +3 -0
- package/dist/models/v1/start-whatsapp-verification-response/start-whatsapp-verification-response.js.map +1 -0
- package/dist/models/v1/verification-report-request/index.d.ts +1 -1
- package/dist/models/v1/verification-report-request/verification-report-request.d.ts +9 -1
- package/dist/models/v1/verification-status-response/verification-status-response.d.ts +2 -1
- package/dist/models/v1/whatsapp-verification-report-response/index.d.ts +1 -0
- package/dist/models/v1/whatsapp-verification-report-response/index.js +3 -0
- package/dist/models/v1/whatsapp-verification-report-response/index.js.map +1 -0
- package/dist/models/v1/whatsapp-verification-report-response/whatsapp-verification-report-response.d.ts +11 -0
- package/dist/models/v1/whatsapp-verification-report-response/whatsapp-verification-report-response.js +3 -0
- package/dist/models/v1/whatsapp-verification-report-response/whatsapp-verification-report-response.js.map +1 -0
- package/dist/models/v1/whatsapp-verification-status-response/index.d.ts +1 -0
- package/dist/models/v1/whatsapp-verification-status-response/index.js +3 -0
- package/dist/models/v1/whatsapp-verification-status-response/index.js.map +1 -0
- package/dist/models/v1/whatsapp-verification-status-response/whatsapp-verification-status-response.d.ts +25 -0
- package/dist/models/v1/whatsapp-verification-status-response/whatsapp-verification-status-response.js +3 -0
- package/dist/models/v1/whatsapp-verification-status-response/whatsapp-verification-status-response.js.map +1 -0
- package/dist/rest/v1/callbacks/callbacks-webhook.d.ts +7 -0
- package/dist/rest/v1/callbacks/callbacks-webhook.js +10 -0
- package/dist/rest/v1/callbacks/callbacks-webhook.js.map +1 -1
- package/dist/rest/v1/index.d.ts +1 -0
- package/dist/rest/v1/index.js +1 -0
- package/dist/rest/v1/index.js.map +1 -1
- package/dist/rest/v1/verification-domain-api.d.ts +14 -11
- package/dist/rest/v1/verification-domain-api.js +25 -32
- package/dist/rest/v1/verification-domain-api.js.map +1 -1
- package/dist/rest/v1/verification-service.d.ts +11 -1
- package/dist/rest/v1/verification-service.js +44 -5
- package/dist/rest/v1/verification-service.js.map +1 -1
- package/dist/rest/v1/verification-status/verification-status-api.d.ts +2 -7
- package/dist/rest/v1/verification-status/verification-status-api.js +2 -10
- package/dist/rest/v1/verification-status/verification-status-api.js.map +1 -1
- package/dist/rest/v1/verifications/verifications-api.d.ts +21 -8
- package/dist/rest/v1/verifications/verifications-api.jest.fixture.d.ts +19 -1
- package/dist/rest/v1/verifications/verifications-api.jest.fixture.js +12 -0
- package/dist/rest/v1/verifications/verifications-api.jest.fixture.js.map +1 -1
- package/dist/rest/v1/verifications/verifications-api.js +80 -21
- package/dist/rest/v1/verifications/verifications-api.js.map +1 -1
- package/package.json +2 -2
- package/dist/models/v1/mod-callbacks/verification-result-event-response/index.d.ts +0 -1
- package/dist/models/v1/mod-callbacks/verification-result-event-response/index.js.map +0 -1
- package/dist/models/v1/mod-callbacks/verification-result-event-response/verification-result-event-response.d.ts +0 -4
- package/dist/models/v1/mod-callbacks/verification-result-event-response/verification-result-event-response.js.map +0 -1
- /package/dist/models/v1/mod-callbacks/{verification-result-event-response → whatsapp-request-event-response}/index.js +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Identity } from '../identity';
|
|
2
|
+
import { WithAdditionalProperties } from '@sinch/sdk-client';
|
|
3
|
+
import { CodeType, WhatsAppCodeType } from '../enums';
|
|
2
4
|
export interface StartVerificationWithSms extends StartVerificationBase {
|
|
3
5
|
/** @see SmsOptions */
|
|
4
6
|
smsOptions?: SmsOptions;
|
|
@@ -24,6 +26,10 @@ export interface StartDataVerification extends StartVerificationBase {
|
|
|
24
26
|
}
|
|
25
27
|
/** @deprecated Use StartDataVerification instead */
|
|
26
28
|
export type StartSeamlessVerification = StartDataVerification;
|
|
29
|
+
export interface StartVerificationWithWhatsApp extends StartVerificationBase {
|
|
30
|
+
/** @see WhatsAppOptions */
|
|
31
|
+
whatsappOptions?: WhatsAppOptions;
|
|
32
|
+
}
|
|
27
33
|
export interface StartVerificationBase {
|
|
28
34
|
/** @see Identity */
|
|
29
35
|
identity: Identity;
|
|
@@ -35,30 +41,29 @@ export interface StartVerificationBase {
|
|
|
35
41
|
/**
|
|
36
42
|
* An optional object for SMS Verification, with default values assumed for all contained values if not provided.
|
|
37
43
|
*/
|
|
38
|
-
export interface SmsOptions {
|
|
44
|
+
export interface SmsOptions extends WithAdditionalProperties {
|
|
39
45
|
/** The expiration time for a verification process is represented in the format `HH:MM:SS`. */
|
|
40
46
|
expiry?: Date | string;
|
|
41
47
|
/** Accepted values for the type of code to be generated are `Numeric`, `Alpha`, and `Alphanumeric`. Default is `Numeric`. */
|
|
42
48
|
codeType?: CodeType;
|
|
43
|
-
/** The SMS template must include a placeholder `{{CODE}}` where the verification code will be inserted, and it can otherwise be customized as desired. */
|
|
44
|
-
template?: string;
|
|
45
49
|
/** A `language-region` identifier according to [IANA](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). Only a subset of those identifiers is accepted. */
|
|
46
50
|
locale?: string;
|
|
47
51
|
}
|
|
48
|
-
export type CodeType = 'Numeric' | 'Alpha' | 'Alphanumeric';
|
|
49
52
|
/**
|
|
50
|
-
* An optional
|
|
53
|
+
* An optional configuration for Flash Call Verification, should be used only when the verification request originates from your backend (not an end user device) and request is signed via an [Application signed request](https://developers.sinch.com/docs/voice/api-reference/authentication/signed-request).
|
|
51
54
|
*/
|
|
52
|
-
export interface FlashCallOptions {
|
|
53
|
-
/** The
|
|
55
|
+
export interface FlashCallOptions extends WithAdditionalProperties {
|
|
56
|
+
/** The amount of time that a phone will ring. */
|
|
54
57
|
dialTimeout?: number;
|
|
58
|
+
/** The maximum time that a phone call verification will be active and can be completed. If the phone number hasn't been verified successfully during this time, then the verification request will fail. By default, the Sinch dashboard will automatically optimize dial time out during a phone call. */
|
|
59
|
+
interceptionTimeout?: number;
|
|
55
60
|
}
|
|
56
61
|
/** @deprecated Use PhoneCallOptions instead */
|
|
57
62
|
export type CalloutOptions = PhoneCallOptions;
|
|
58
63
|
/**
|
|
59
64
|
* An optional object for Phone Call Verification, with default values assumed for all contained values if not provided.
|
|
60
65
|
*/
|
|
61
|
-
export interface PhoneCallOptions {
|
|
66
|
+
export interface PhoneCallOptions extends WithAdditionalProperties {
|
|
62
67
|
/** @see PhoneCallOptionsSpeech */
|
|
63
68
|
speech?: PhoneCallOptionsSpeech;
|
|
64
69
|
}
|
|
@@ -71,3 +76,10 @@ export interface PhoneCallOptionsSpeech {
|
|
|
71
76
|
/** A `language-region` identifier according to [IANA](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). Only a subset of those identifiers is accepted. */
|
|
72
77
|
locale?: string;
|
|
73
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* An optional configuration for WhatsApp Verification, should be used only when the verification request originates from your backend (not an end user device) and request is signed via an [Application signed request](https://developers.sinch.com/docs/voice/api-reference/authentication/signed-request).
|
|
81
|
+
*/
|
|
82
|
+
export interface WhatsAppOptions extends WithAdditionalProperties {
|
|
83
|
+
/** Selects type of code which will be sent to customer */
|
|
84
|
+
codeType?: WhatsAppCodeType;
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { StartWhatsAppVerificationResponse } from './start-whatsapp-verification-response';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/start-whatsapp-verification-response/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LinksObject } from '../links-object';
|
|
2
|
+
import { WithAdditionalProperties } from '@sinch/sdk-client';
|
|
3
|
+
import { WhatsAppCodeType } from '../enums';
|
|
4
|
+
export interface StartWhatsAppVerificationResponse {
|
|
5
|
+
/** Verification identifier used to query for status. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** The value of the method used for the Verification. For WhatsApp Verifications, this will always be `whatsapp`. */
|
|
8
|
+
method?: 'whatsapp';
|
|
9
|
+
/** The response contains the `codeType` property. */
|
|
10
|
+
whatsapp?: WhatsAppContent;
|
|
11
|
+
/** @see LinksObject */
|
|
12
|
+
_links?: LinksObject[];
|
|
13
|
+
}
|
|
14
|
+
interface WhatsAppContent extends WithAdditionalProperties {
|
|
15
|
+
/** Accepted values for the type of code to be generated are `Numeric`, `Alpha`, and `Alphanumeric`. Default is `Numeric`. */
|
|
16
|
+
codeType?: WhatsAppCodeType;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-whatsapp-verification-response.js","sourceRoot":"","sources":["../../../../src/models/v1/start-whatsapp-verification-response/start-whatsapp-verification-response.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { SmsVerificationReportRequest, FlashCallVerificationReportRequest, PhoneCallVerificationReportRequest, PhoneCallVerificationReportRequestServerModel, CalloutVerificationReportRequest, } from './verification-report-request';
|
|
1
|
+
export type { SmsVerificationReportRequest, FlashCallVerificationReportRequest, PhoneCallVerificationReportRequest, PhoneCallVerificationReportRequestServerModel, CalloutVerificationReportRequest, WhatsAppVerificationReportRequest, WhatsAppContent, } from './verification-report-request';
|
|
@@ -5,7 +5,7 @@ export interface SmsVerificationReportRequest {
|
|
|
5
5
|
interface SmsContent {
|
|
6
6
|
/** The code which was received by the user submitting the SMS verification. */
|
|
7
7
|
code: string;
|
|
8
|
-
/** The sender ID of the SMS. */
|
|
8
|
+
/** @deprecated The sender ID of the SMS. */
|
|
9
9
|
cli?: string;
|
|
10
10
|
}
|
|
11
11
|
export interface FlashCallVerificationReportRequest {
|
|
@@ -35,4 +35,12 @@ interface PhoneCallContent {
|
|
|
35
35
|
}
|
|
36
36
|
/** @deprecated Use PhoneCallContent instead */
|
|
37
37
|
type CalloutContent = PhoneCallContent;
|
|
38
|
+
export interface WhatsAppVerificationReportRequest {
|
|
39
|
+
/** A configuration object containing settings specific to WhatsApp verifications. */
|
|
40
|
+
whatsapp: WhatsAppContent;
|
|
41
|
+
}
|
|
42
|
+
export interface WhatsAppContent {
|
|
43
|
+
/** The code which was received by the user submitting the WhatsApp verification. */
|
|
44
|
+
code: string;
|
|
45
|
+
}
|
|
38
46
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SmsVerificationStatusResponse } from '../sms-verification-status-response';
|
|
2
2
|
import { FlashCallVerificationStatusResponse } from '../flashcall-verification-status-response';
|
|
3
3
|
import { CalloutVerificationStatusResponse, PhoneCallVerificationStatusResponse } from '../phonecall-verification-status-response';
|
|
4
|
-
|
|
4
|
+
import { WhatsAppVerificationStatusResponse } from '../whatsapp-verification-status-response';
|
|
5
|
+
export type VerificationStatusResponse = SmsVerificationStatusResponse | FlashCallVerificationStatusResponse | CalloutVerificationStatusResponse | PhoneCallVerificationStatusResponse | WhatsAppVerificationStatusResponse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { WhatsAppVerificationReportResponse } from './whatsapp-verification-report-response';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/whatsapp-verification-report-response/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReasonEnum, VerificationStatusEnum } from '../enums';
|
|
2
|
+
export interface WhatsAppVerificationReportResponse {
|
|
3
|
+
/** The unique ID of the verification request. */
|
|
4
|
+
id?: string;
|
|
5
|
+
/** The method of the verification request. This will always be `whatsapp`. */
|
|
6
|
+
method?: 'whatsapp';
|
|
7
|
+
/** The status of the verification request. */
|
|
8
|
+
status?: VerificationStatusEnum;
|
|
9
|
+
/** Displays the reason why a verification has `FAILED`, was `DENIED`, or was `ABORTED`. */
|
|
10
|
+
reason?: ReasonEnum;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp-verification-report-response.js","sourceRoot":"","sources":["../../../../src/models/v1/whatsapp-verification-report-response/whatsapp-verification-report-response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { WhatsAppVerificationStatusResponse } from './whatsapp-verification-status-response';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/whatsapp-verification-status-response/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReasonEnum, SourceEnum, VerificationStatusEnum } from '../enums';
|
|
2
|
+
import { Identity } from '../identity';
|
|
3
|
+
import { VerificationPriceSms } from '../verification-price-sms';
|
|
4
|
+
export interface WhatsAppVerificationStatusResponse {
|
|
5
|
+
/** The unique ID of the verification request. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** The method of the verification request. This will always be `whatsapp`. */
|
|
8
|
+
method?: 'whatsapp';
|
|
9
|
+
/** The status of the verification request. */
|
|
10
|
+
status?: VerificationStatusEnum;
|
|
11
|
+
/** Displays the reason why a verification has `FAILED`, was `DENIED`, or was `ABORTED`. */
|
|
12
|
+
reason?: ReasonEnum;
|
|
13
|
+
/** Used to pass your own reference in the request for tracking purposes. Must be a unique value for each started verification request. The value must be encodable in the URL path segment. This value is passed to all events and returned from the status and report endpoints. The reference can be used to check the [status of verifications](https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-status/#tag/Verification-status/operation/VerificationStatusByReference), like with ID or identity. */
|
|
14
|
+
reference?: string;
|
|
15
|
+
/** Prices associated with this verification */
|
|
16
|
+
price?: VerificationPriceSms;
|
|
17
|
+
/** @see Identity */
|
|
18
|
+
identity?: Identity;
|
|
19
|
+
/** The ID of the country to which the verification was sent. */
|
|
20
|
+
countryId?: string;
|
|
21
|
+
/** The timestamp in UTC format. </br> **Note:** The formatting does not respect `ISO-8601` and the returned value has the format `YYYY-MM-DDThh:mm:ss.SSS`. If you need to parse this value into a specific date object in your programming language, please append `Z` (Zulu time = UTC) at the end of the date value to match the `ISO-8601` format: `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
22
|
+
verificationTimestamp?: Date;
|
|
23
|
+
/** @see Source */
|
|
24
|
+
source?: SourceEnum;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp-verification-status-response.js","sourceRoot":"","sources":["../../../../src/models/v1/whatsapp-verification-status-response/whatsapp-verification-status-response.ts"],"names":[],"mappings":""}
|
|
@@ -22,4 +22,11 @@ export declare class VerificationCallbackWebhooks implements CallbackProcessor<V
|
|
|
22
22
|
* @return {VerificationCallbackEvent} - The parsed verification event object.
|
|
23
23
|
*/
|
|
24
24
|
parseEvent(eventBody: any): VerificationCallbackEvent;
|
|
25
|
+
/**
|
|
26
|
+
* Static reviver for a Verification Event.
|
|
27
|
+
* This method ensures the object can be treated as a Verification Event.
|
|
28
|
+
* @param {any} eventBody - The event body containing the Verification event notification.
|
|
29
|
+
* @return {VerificationCallbackEvent} - The parsed Verification event object
|
|
30
|
+
*/
|
|
31
|
+
static parseEvent(eventBody: any): VerificationCallbackEvent;
|
|
25
32
|
}
|
|
@@ -45,6 +45,16 @@ class VerificationCallbackWebhooks {
|
|
|
45
45
|
console.log(`Unknown Verification event structure:\n${JSON.stringify(eventBody)}`);
|
|
46
46
|
throw new Error('Unknown Verification event');
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Static reviver for a Verification Event.
|
|
50
|
+
* This method ensures the object can be treated as a Verification Event.
|
|
51
|
+
* @param {any} eventBody - The event body containing the Verification event notification.
|
|
52
|
+
* @return {VerificationCallbackEvent} - The parsed Verification event object
|
|
53
|
+
*/
|
|
54
|
+
static parseEvent(eventBody) {
|
|
55
|
+
const instance = new VerificationCallbackWebhooks({});
|
|
56
|
+
return instance.parseEvent(eventBody);
|
|
57
|
+
}
|
|
48
58
|
}
|
|
49
59
|
exports.VerificationCallbackWebhooks = VerificationCallbackWebhooks;
|
|
50
60
|
//# sourceMappingURL=callbacks-webhook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbacks-webhook.js","sourceRoot":"","sources":["../../../../src/rest/v1/callbacks/callbacks-webhook.ts"],"names":[],"mappings":";;;AAMA,kDAA2G;AAM3G,MAAa,4BAA4B;IAIvC,YAAY,qBAA4C;QACtD,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IACrD,CAAC;IAED;;;;;;;OAOG;IACI,4BAA4B,CACjC,OAA4B,EAC5B,IAAS,EACT,IAAY,EACZ,MAAc;QAEd,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,CAAC;YAChG,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,IAAA,yCAA4B,EACjC,IAAI,CAAC,qBAAqB,CAAC,cAAc,EACzC,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,UAAU,CAAC,SAAc;QAC9B,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;YAClC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpC,CAAC;QACD,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YACpB,QAAQ,SAAS,CAAC,KAAK,EA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AAC,EAAE,CAAC,CAAC;QACnF,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,UAAU,CAAC,SAAa;QACpC,MAAM,QAAQ,GAAG,IAAI,4BAA4B,CAAC,EAAE,CAAC,CAAC;QACtD,OAAO,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;CAEF;AApED,oEAoEC"}
|
package/dist/rest/v1/index.d.ts
CHANGED
package/dist/rest/v1/index.js
CHANGED
|
@@ -18,5 +18,6 @@ __exportStar(require("./callbacks"), exports);
|
|
|
18
18
|
__exportStar(require("./verification-status"), exports);
|
|
19
19
|
__exportStar(require("./verifications"), exports);
|
|
20
20
|
__exportStar(require("./enums"), exports);
|
|
21
|
+
__exportStar(require("./verification-domain-api"), exports);
|
|
21
22
|
__exportStar(require("./verification-service"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rest/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wDAAsC;AACtC,kDAAgC;AAChC,0CAAwB;AACxB,yDAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rest/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wDAAsC;AACtC,kDAAgC;AAChC,0CAAwB;AACxB,4DAA0C;AAC1C,yDAAuC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { Api, ApiClient,
|
|
1
|
+
import { Api, ApiClient, ApplicationCredentials } from '@sinch/sdk-client';
|
|
2
|
+
import { LazyVerificationApiClient } from './verification-service';
|
|
2
3
|
export declare class VerificationDomainApi implements Api {
|
|
4
|
+
readonly lazyClient: LazyVerificationApiClient;
|
|
3
5
|
readonly apiName: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
constructor(lazyClient: LazyVerificationApiClient, apiName: string);
|
|
7
|
+
get client(): ApiClient;
|
|
8
|
+
/**
|
|
9
|
+
* Kept for backward compatibility - TODO: remove in future major release
|
|
10
|
+
* @return {ApiClient}
|
|
11
|
+
* @deprecated
|
|
12
|
+
*/
|
|
13
|
+
getSinchClient(): ApiClient;
|
|
7
14
|
/**
|
|
8
15
|
* Update the default hostname for the API
|
|
9
16
|
* @param {string} hostname - The new hostname to use for the APIs.
|
|
@@ -13,13 +20,9 @@ export declare class VerificationDomainApi implements Api {
|
|
|
13
20
|
* Updates the application credentials used to authenticate API requests
|
|
14
21
|
* @param {ApplicationCredentials} credentials
|
|
15
22
|
*/
|
|
16
|
-
|
|
17
|
-
private resetApiClient;
|
|
23
|
+
setCredentials(credentials: Partial<ApplicationCredentials>): void;
|
|
18
24
|
/**
|
|
19
|
-
*
|
|
20
|
-
* be returned for the subsequent API calls (singleton pattern)
|
|
21
|
-
* @return {ApiClient} the API Client or throws an error in case the configuration parameters are not ok
|
|
22
|
-
* @private
|
|
25
|
+
* @deprecated Use setCredentials instead
|
|
23
26
|
*/
|
|
24
|
-
|
|
27
|
+
setApplication(credentials: ApplicationCredentials): void;
|
|
25
28
|
}
|
|
@@ -1,62 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VerificationDomainApi = void 0;
|
|
4
|
-
const sdk_client_1 = require("@sinch/sdk-client");
|
|
5
4
|
class VerificationDomainApi {
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
5
|
+
constructor(lazyClient, apiName) {
|
|
6
|
+
this.lazyClient = lazyClient;
|
|
8
7
|
this.apiName = apiName;
|
|
9
8
|
}
|
|
9
|
+
get client() {
|
|
10
|
+
return this.lazyClient.getApiClient();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Kept for backward compatibility - TODO: remove in future major release
|
|
14
|
+
* @return {ApiClient}
|
|
15
|
+
* @deprecated
|
|
16
|
+
*/
|
|
17
|
+
getSinchClient() {
|
|
18
|
+
return this.lazyClient.getApiClient();
|
|
19
|
+
}
|
|
10
20
|
/**
|
|
11
21
|
* Update the default hostname for the API
|
|
12
22
|
* @param {string} hostname - The new hostname to use for the APIs.
|
|
13
23
|
*/
|
|
14
24
|
setHostname(hostname) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
this.client.apiClientOptions.hostname = hostname;
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
console.error('Impossible to set a new hostname, the Application credentials need to be provided first.');
|
|
21
|
-
throw error;
|
|
22
|
-
}
|
|
25
|
+
this.lazyClient.sharedConfig.verificationHostname = hostname;
|
|
26
|
+
this.lazyClient.getApiClient().apiClientOptions.hostname = hostname;
|
|
23
27
|
}
|
|
24
28
|
/**
|
|
25
29
|
* Updates the application credentials used to authenticate API requests
|
|
26
30
|
* @param {ApplicationCredentials} credentials
|
|
27
31
|
*/
|
|
28
|
-
|
|
29
|
-
const parametersBackup = { ...this.
|
|
30
|
-
this.
|
|
32
|
+
setCredentials(credentials) {
|
|
33
|
+
const parametersBackup = { ...this.lazyClient.sharedConfig };
|
|
34
|
+
this.lazyClient.sharedConfig = {
|
|
31
35
|
...parametersBackup,
|
|
32
36
|
...credentials,
|
|
33
37
|
};
|
|
34
|
-
this.resetApiClient();
|
|
38
|
+
this.lazyClient.resetApiClient();
|
|
35
39
|
try {
|
|
36
|
-
this.
|
|
40
|
+
this.lazyClient.getApiClient();
|
|
37
41
|
}
|
|
38
42
|
catch (error) {
|
|
39
|
-
console.error('Impossible to assign the new
|
|
40
|
-
this.
|
|
43
|
+
console.error('Impossible to assign the new credentials to the Verification API');
|
|
44
|
+
this.lazyClient.sharedConfig = parametersBackup;
|
|
41
45
|
throw error;
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
|
-
resetApiClient() {
|
|
45
|
-
this.client = undefined;
|
|
46
|
-
}
|
|
47
48
|
/**
|
|
48
|
-
*
|
|
49
|
-
* be returned for the subsequent API calls (singleton pattern)
|
|
50
|
-
* @return {ApiClient} the API Client or throws an error in case the configuration parameters are not ok
|
|
51
|
-
* @private
|
|
49
|
+
* @deprecated Use setCredentials instead
|
|
52
50
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const apiClientOptions = (0, sdk_client_1.buildApplicationSignedApiClientOptions)(this.sinchClientParameters, 'Verification');
|
|
56
|
-
this.client = new sdk_client_1.ApiFetchClient(apiClientOptions);
|
|
57
|
-
this.client.apiClientOptions.hostname = this.sinchClientParameters.verificationHostname ?? sdk_client_1.VERIFICATION_HOSTNAME;
|
|
58
|
-
}
|
|
59
|
-
return this.client;
|
|
51
|
+
setApplication(credentials) {
|
|
52
|
+
this.setCredentials(credentials);
|
|
60
53
|
}
|
|
61
54
|
}
|
|
62
55
|
exports.VerificationDomainApi = VerificationDomainApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-domain-api.js","sourceRoot":"","sources":["../../../src/rest/v1/verification-domain-api.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"verification-domain-api.js","sourceRoot":"","sources":["../../../src/rest/v1/verification-domain-api.ts"],"names":[],"mappings":";;;AAOA,MAAa,qBAAqB;IAEhC,YACkB,UAAqC,EACrC,OAAe;QADf,eAAU,GAAV,UAAU,CAA2B;QACrC,YAAO,GAAP,OAAO,CAAQ;IAC9B,CAAC;IAEJ,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;IACxC,CAAC;IAED;;;;OAIG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;IACxC,CAAC;IAED;;;OAGG;IACI,WAAW,CAAC,QAAgB;QACjC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,oBAAoB,GAAG,QAAQ,CAAC;QAC7D,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,gBAAgB,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,cAAc,CAAC,WAA4C;QAChE,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QAC7D,IAAI,CAAC,UAAU,CAAC,YAAY,GAAG;YAC7B,GAAG,gBAAgB;YACnB,GAAG,WAAW;SACf,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAClF,IAAI,CAAC,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;YAChD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;OAEG;IACI,cAAc,CAAC,WAAmC;QACvD,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;CAEF;AAxDD,sDAwDC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { SinchClientParameters } from '@sinch/sdk-client';
|
|
1
|
+
import { ApiFetchClient, ApplicationCredentials, SinchClientParameters } from '@sinch/sdk-client';
|
|
2
2
|
import { VerificationStatusApi } from './verification-status';
|
|
3
3
|
import { VerificationsApi } from './verifications';
|
|
4
|
+
export declare class LazyVerificationApiClient {
|
|
5
|
+
sharedConfig: SinchClientParameters;
|
|
6
|
+
apiFetchClient?: ApiFetchClient;
|
|
7
|
+
constructor(sharedConfig: SinchClientParameters);
|
|
8
|
+
getApiClient(): ApiFetchClient;
|
|
9
|
+
resetApiClient(): void;
|
|
10
|
+
}
|
|
4
11
|
/**
|
|
5
12
|
* The Verification Service exposes the following APIs:
|
|
6
13
|
* - verifications
|
|
@@ -9,6 +16,7 @@ import { VerificationsApi } from './verifications';
|
|
|
9
16
|
export declare class VerificationService {
|
|
10
17
|
readonly verificationStatus: VerificationStatusApi;
|
|
11
18
|
readonly verifications: VerificationsApi;
|
|
19
|
+
readonly lazyClient: LazyVerificationApiClient;
|
|
12
20
|
/**
|
|
13
21
|
* Create a new VerificationService instance with its configuration. It needs the following parameters for authentication:
|
|
14
22
|
* - `applicationKey`
|
|
@@ -19,9 +27,11 @@ export declare class VerificationService {
|
|
|
19
27
|
* @param {SinchClientParameters} params - an Object containing the necessary properties to initialize the service
|
|
20
28
|
*/
|
|
21
29
|
constructor(params: SinchClientParameters);
|
|
30
|
+
setApiClientConfig(newParams: SinchClientParameters): void;
|
|
22
31
|
/**
|
|
23
32
|
* Update the default hostname for each API
|
|
24
33
|
* @param {string} hostname - The new hostname to use for all the APIs.
|
|
25
34
|
*/
|
|
26
35
|
setHostname(hostname: string): void;
|
|
36
|
+
setCredentials(credentials: Partial<ApplicationCredentials>): void;
|
|
27
37
|
}
|
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VerificationService = void 0;
|
|
3
|
+
exports.VerificationService = exports.LazyVerificationApiClient = void 0;
|
|
4
|
+
const sdk_client_1 = require("@sinch/sdk-client");
|
|
4
5
|
const verification_status_1 = require("./verification-status");
|
|
5
6
|
const verifications_1 = require("./verifications");
|
|
7
|
+
class LazyVerificationApiClient {
|
|
8
|
+
constructor(sharedConfig) {
|
|
9
|
+
this.sharedConfig = sharedConfig;
|
|
10
|
+
}
|
|
11
|
+
getApiClient() {
|
|
12
|
+
if (!this.apiFetchClient) {
|
|
13
|
+
const apiClientOptions = (0, sdk_client_1.buildApplicationSignedApiClientOptions)(this.sharedConfig, 'Verification');
|
|
14
|
+
this.apiFetchClient = new sdk_client_1.ApiFetchClient(apiClientOptions);
|
|
15
|
+
this.apiFetchClient.apiClientOptions.hostname = this.sharedConfig.verificationHostname ?? sdk_client_1.VERIFICATION_HOSTNAME;
|
|
16
|
+
}
|
|
17
|
+
return this.apiFetchClient;
|
|
18
|
+
}
|
|
19
|
+
resetApiClient() {
|
|
20
|
+
this.apiFetchClient = undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.LazyVerificationApiClient = LazyVerificationApiClient;
|
|
6
24
|
/**
|
|
7
25
|
* The Verification Service exposes the following APIs:
|
|
8
26
|
* - verifications
|
|
@@ -19,16 +37,37 @@ class VerificationService {
|
|
|
19
37
|
* @param {SinchClientParameters} params - an Object containing the necessary properties to initialize the service
|
|
20
38
|
*/
|
|
21
39
|
constructor(params) {
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
40
|
+
this.lazyClient = new LazyVerificationApiClient(params);
|
|
41
|
+
this.verificationStatus = new verification_status_1.VerificationStatusApi(this.lazyClient);
|
|
42
|
+
this.verifications = new verifications_1.VerificationsApi(this.lazyClient);
|
|
43
|
+
}
|
|
44
|
+
setApiClientConfig(newParams) {
|
|
45
|
+
this.lazyClient.sharedConfig = newParams;
|
|
46
|
+
this.lazyClient.resetApiClient();
|
|
24
47
|
}
|
|
25
48
|
/**
|
|
26
49
|
* Update the default hostname for each API
|
|
27
50
|
* @param {string} hostname - The new hostname to use for all the APIs.
|
|
28
51
|
*/
|
|
29
52
|
setHostname(hostname) {
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
53
|
+
this.lazyClient.sharedConfig.verificationHostname = hostname;
|
|
54
|
+
this.lazyClient.getApiClient().apiClientOptions.hostname = hostname;
|
|
55
|
+
}
|
|
56
|
+
setCredentials(credentials) {
|
|
57
|
+
const parametersBackup = { ...this.lazyClient.sharedConfig };
|
|
58
|
+
this.lazyClient.sharedConfig = {
|
|
59
|
+
...parametersBackup,
|
|
60
|
+
...credentials,
|
|
61
|
+
};
|
|
62
|
+
this.lazyClient.resetApiClient();
|
|
63
|
+
try {
|
|
64
|
+
this.lazyClient.getApiClient();
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
console.error('Impossible to assign the new credentials to the Verification API');
|
|
68
|
+
this.lazyClient.sharedConfig = parametersBackup;
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
32
71
|
}
|
|
33
72
|
}
|
|
34
73
|
exports.VerificationService = VerificationService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-service.js","sourceRoot":"","sources":["../../../src/rest/v1/verification-service.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"verification-service.js","sourceRoot":"","sources":["../../../src/rest/v1/verification-service.ts"],"names":[],"mappings":";;;AAAA,kDAM2B;AAC3B,+DAA8D;AAC9D,mDAAmD;AAEnD,MAAa,yBAAyB;IAEpC,YAAmB,YAAmC;QAAnC,iBAAY,GAAZ,YAAY,CAAuB;IAAG,CAAC;IAEnD,YAAY;QACjB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YACzB,MAAM,gBAAgB,GAAG,IAAA,mDAAsC,EAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;YACnG,IAAI,CAAC,cAAc,GAAG,IAAI,2BAAc,CAAC,gBAAgB,CAAC,CAAC;YAC3D,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,oBAAoB,IAAI,kCAAqB,CAAC;QAClH,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,cAAc;QACnB,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;IAClC,CAAC;CACF;AAhBD,8DAgBC;AAED;;;;GAIG;AACH,MAAa,mBAAmB;IAM9B;;;;;;;;OAQG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,UAAU,GAAG,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;QAExD,IAAI,CAAC,kBAAkB,GAAG,IAAI,2CAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,IAAI,CAAC,aAAa,GAAG,IAAI,gCAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7D,CAAC;IAEM,kBAAkB,CAAC,SAAgC;QACxD,IAAI,CAAC,UAAU,CAAC,YAAY,GAAG,SAAS,CAAC;QACzC,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,WAAW,CAAC,QAAgB;QACjC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,oBAAoB,GAAG,QAAQ,CAAC;QAC7D,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,gBAAgB,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACtE,CAAC;IAEM,cAAc,CAAC,WAA4C;QAChE,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QAC7D,IAAI,CAAC,UAAU,CAAC,YAAY,GAAG;YAC7B,GAAG,gBAAgB;YACnB,GAAG,WAAW;SACf,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAClF,IAAI,CAAC,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;YAChD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAnDD,kDAmDC"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { SinchClientParameters } from '@sinch/sdk-client';
|
|
2
1
|
import { VerificationStatusResponse, VerificationStatusByIdentityRequestData, VerificationStatusByIdRequestData, VerificationStatusByReferenceRequestData } from '../../../models';
|
|
3
2
|
import { VerificationDomainApi } from '../verification-domain-api';
|
|
3
|
+
import { LazyVerificationApiClient } from '../verification-service';
|
|
4
4
|
export declare class VerificationStatusApi extends VerificationDomainApi {
|
|
5
|
-
|
|
6
|
-
* Initialize your interface
|
|
7
|
-
*
|
|
8
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
9
|
-
*/
|
|
10
|
-
constructor(sinchClientParameters: SinchClientParameters);
|
|
5
|
+
constructor(lazyClient: LazyVerificationApiClient);
|
|
11
6
|
/**
|
|
12
7
|
* Get verification by ID
|
|
13
8
|
* Queries the verification result by sending the verification ID. With this query you can get the result of a verification.
|
|
@@ -3,13 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VerificationStatusApi = void 0;
|
|
4
4
|
const verification_domain_api_1 = require("../verification-domain-api");
|
|
5
5
|
class VerificationStatusApi extends verification_domain_api_1.VerificationDomainApi {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
10
|
-
*/
|
|
11
|
-
constructor(sinchClientParameters) {
|
|
12
|
-
super(sinchClientParameters, 'VerificationStatusApi');
|
|
6
|
+
constructor(lazyClient) {
|
|
7
|
+
super(lazyClient, 'VerificationStatusApi');
|
|
13
8
|
}
|
|
14
9
|
/**
|
|
15
10
|
* Get verification by ID
|
|
@@ -17,7 +12,6 @@ class VerificationStatusApi extends verification_domain_api_1.VerificationDomain
|
|
|
17
12
|
* @param { VerificationStatusByIdRequestData } data - The data to provide to the API call.
|
|
18
13
|
*/
|
|
19
14
|
async getById(data) {
|
|
20
|
-
this.client = this.getSinchClient();
|
|
21
15
|
const getParams = this.client.extractQueryParams(data, []);
|
|
22
16
|
const headers = {
|
|
23
17
|
'Content-Type': 'application/json',
|
|
@@ -41,7 +35,6 @@ class VerificationStatusApi extends verification_domain_api_1.VerificationDomain
|
|
|
41
35
|
* @param { VerificationStatusByIdentityRequestData } data - The data to provide to the API call.
|
|
42
36
|
*/
|
|
43
37
|
async getByIdentity(data) {
|
|
44
|
-
this.client = this.getSinchClient();
|
|
45
38
|
const getParams = this.client.extractQueryParams(data, []);
|
|
46
39
|
const headers = {
|
|
47
40
|
'Content-Type': 'application/json',
|
|
@@ -69,7 +62,6 @@ class VerificationStatusApi extends verification_domain_api_1.VerificationDomain
|
|
|
69
62
|
* @param { VerificationStatusByReferenceRequestData } data - The data to provide to the API call.
|
|
70
63
|
*/
|
|
71
64
|
async getByReference(data) {
|
|
72
|
-
this.client = this.getSinchClient();
|
|
73
65
|
const getParams = this.client.extractQueryParams(data, []);
|
|
74
66
|
const headers = {
|
|
75
67
|
'Content-Type': 'application/json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-status-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/verification-status/verification-status-api.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"verification-status-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/verification-status/verification-status-api.ts"],"names":[],"mappings":";;;AAOA,wEAAmE;AAGnE,MAAa,qBAAsB,SAAQ,+CAAqB;IAE9D,YAAY,UAAqC;QAC/C,KAAK,CAAC,UAAU,EAAG,uBAAuB,CAAC,CAAC;IAC9C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,OAAO,CAAC,IAAuC;QAC1D,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAoC,IAAI,EAAE,EAAa,CAAC,CAAC;QACzG,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,qCAAqC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/D,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC;QAEjE,MAAM,cAAc,GAChB,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE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