@nexeraid/kyc-sdk
Advanced tools
Comparing version 0.2.7 to 0.2.8
@@ -5,2 +5,3 @@ 'use strict'; | ||
var kyc = require('@nexeraprotocol/nexera-id-schemas/compliance/kyc'); | ||
var zod = require('zod'); | ||
@@ -415,4 +416,2 @@ | ||
var KYCDataResponseSchema = zod.z["enum"](KYCDataResponses); | ||
var KYCDataMessages = ["requestInitialData", "signatureRequest", "kycCompletition", "offChainShareCompletition", "closeScreen"]; | ||
var KYCDataMessageSchema = zod.z["enum"](KYCDataMessages); | ||
@@ -495,3 +494,3 @@ var KycClient = /*#__PURE__*/_createClass(function KycClient(config) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].requestInitialData && !_this.initDataSent && ( | ||
kycData.type === kyc.KycSdkResponsesSchema["enum"].requestInitialData && !_this.initDataSent && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -517,3 +516,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier))) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].signatureRequest && ( | ||
kycData.type === kyc.KycSdkResponsesSchema["enum"].signatureRequest && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -539,3 +538,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier)) && (_this$callbacks = _this.callbacks) !== null && _this$callbacks !== void 0 && _this$callbacks.signPersonalDataCallback)) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].kycCompletition && ( | ||
kycData.type === kyc.KycSdkResponsesSchema["enum"].kycCompletition && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -545,5 +544,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier)) && (_this$callbacks2 = _this.callbacks) !== null && _this$callbacks2 !== void 0 && _this$callbacks2.kycCompletionCallback) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.data.idScanVerifiableCredential, | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.data.id3VerifiableCredential); | ||
kyc.KycCompletitionDataSchema.parse(kycData.data)); | ||
_this._closeFlow(); | ||
@@ -553,3 +550,3 @@ } | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].offChainShareCompletition && ( | ||
kycData.type === kyc.KycSdkResponsesSchema["enum"].offChainShareCompletition && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -564,3 +561,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier))) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].closeScreen && ( | ||
kycData.type === kyc.KycSdkResponsesSchema["enum"].closeScreen && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -651,6 +648,4 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier))) { | ||
exports.KYCDataMessageSchema = KYCDataMessageSchema; | ||
exports.KYCDataMessages = KYCDataMessages; | ||
exports.KYCDataResponseSchema = KYCDataResponseSchema; | ||
exports.KYCDataResponses = KYCDataResponses; | ||
exports["default"] = KycClient; |
@@ -5,2 +5,3 @@ 'use strict'; | ||
var kyc = require('@nexeraprotocol/nexera-id-schemas/compliance/kyc'); | ||
var zod = require('zod'); | ||
@@ -415,4 +416,2 @@ | ||
var KYCDataResponseSchema = zod.z["enum"](KYCDataResponses); | ||
var KYCDataMessages = ["requestInitialData", "signatureRequest", "kycCompletition", "offChainShareCompletition", "closeScreen"]; | ||
var KYCDataMessageSchema = zod.z["enum"](KYCDataMessages); | ||
@@ -495,3 +494,3 @@ var KycClient = /*#__PURE__*/_createClass(function KycClient(config) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].requestInitialData && !_this.initDataSent && ( | ||
kycData.type === kyc.KycSdkResponsesSchema["enum"].requestInitialData && !_this.initDataSent && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -517,3 +516,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier))) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].signatureRequest && ( | ||
kycData.type === kyc.KycSdkResponsesSchema["enum"].signatureRequest && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -539,3 +538,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier)) && (_this$callbacks = _this.callbacks) !== null && _this$callbacks !== void 0 && _this$callbacks.signPersonalDataCallback)) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].kycCompletition && ( | ||
kycData.type === kyc.KycSdkResponsesSchema["enum"].kycCompletition && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -545,5 +544,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier)) && (_this$callbacks2 = _this.callbacks) !== null && _this$callbacks2 !== void 0 && _this$callbacks2.kycCompletionCallback) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.data.idScanVerifiableCredential, | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.data.id3VerifiableCredential); | ||
kyc.KycCompletitionDataSchema.parse(kycData.data)); | ||
_this._closeFlow(); | ||
@@ -553,3 +550,3 @@ } | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].offChainShareCompletition && ( | ||
kycData.type === kyc.KycSdkResponsesSchema["enum"].offChainShareCompletition && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -564,3 +561,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier))) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].closeScreen && ( | ||
kycData.type === kyc.KycSdkResponsesSchema["enum"].closeScreen && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -651,6 +648,4 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier))) { | ||
exports.KYCDataMessageSchema = KYCDataMessageSchema; | ||
exports.KYCDataMessages = KYCDataMessages; | ||
exports.KYCDataResponseSchema = KYCDataResponseSchema; | ||
exports.KYCDataResponses = KYCDataResponses; | ||
exports["default"] = KycClient; |
@@ -0,1 +1,2 @@ | ||
import { KycSdkResponsesSchema, KycCompletitionDataSchema } from '@nexeraprotocol/nexera-id-schemas/compliance/kyc'; | ||
import { z } from 'zod'; | ||
@@ -410,4 +411,2 @@ | ||
var KYCDataResponseSchema = z["enum"](KYCDataResponses); | ||
var KYCDataMessages = ["requestInitialData", "signatureRequest", "kycCompletition", "offChainShareCompletition", "closeScreen"]; | ||
var KYCDataMessageSchema = z["enum"](KYCDataMessages); | ||
@@ -490,3 +489,3 @@ var KycClient = /*#__PURE__*/_createClass(function KycClient(config) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].requestInitialData && !_this.initDataSent && ( | ||
kycData.type === KycSdkResponsesSchema["enum"].requestInitialData && !_this.initDataSent && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -512,3 +511,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier))) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].signatureRequest && ( | ||
kycData.type === KycSdkResponsesSchema["enum"].signatureRequest && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -534,3 +533,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier)) && (_this$callbacks = _this.callbacks) !== null && _this$callbacks !== void 0 && _this$callbacks.signPersonalDataCallback)) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].kycCompletition && ( | ||
kycData.type === KycSdkResponsesSchema["enum"].kycCompletition && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -540,5 +539,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier)) && (_this$callbacks2 = _this.callbacks) !== null && _this$callbacks2 !== void 0 && _this$callbacks2.kycCompletionCallback) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.data.idScanVerifiableCredential, | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.data.id3VerifiableCredential); | ||
KycCompletitionDataSchema.parse(kycData.data)); | ||
_this._closeFlow(); | ||
@@ -548,3 +545,3 @@ } | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].offChainShareCompletition && ( | ||
kycData.type === KycSdkResponsesSchema["enum"].offChainShareCompletition && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -559,3 +556,3 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier))) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
kycData.type === KYCDataMessageSchema["enum"].closeScreen && ( | ||
kycData.type === KycSdkResponsesSchema["enum"].closeScreen && ( | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access | ||
@@ -646,2 +643,2 @@ !_this.identifier || _this.identifier === (kycData === null || kycData === void 0 ? void 0 : kycData.identifier))) { | ||
export { KYCDataMessageSchema, KYCDataMessages, KYCDataResponseSchema, KYCDataResponses, KycClient as default }; | ||
export { KYCDataResponseSchema, KYCDataResponses, KycClient as default }; |
import { type Environment } from "@nexeraprotocol/nexera-id-schemas"; | ||
import { type DataAvailableOnInit } from "@nexeraprotocol/nexera-id-schemas/compliance/kyc"; | ||
import { type DataAvailableOnInit, type KycCompletionData } from "@nexeraprotocol/nexera-id-schemas/compliance/kyc"; | ||
import { type IKycClient, type KYCSDKInitOptions } from "./types/client"; | ||
@@ -29,3 +29,13 @@ export * from "./types/client"; | ||
onOffChainShareCompletition: (offChainShareCompletionCallback: () => void) => void; | ||
onKycCompletion: (kycCompletionCallback: (idScanVerifiableCredential: any, id3VerifiableCredential: any) => void) => void; | ||
onKycCompletion: (kycCompletionCallback: (data: import("zod").objectOutputType<{ | ||
issuer: import("zod").ZodString; | ||
type: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodPipeline<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodEnum<["IDScan", "ID3-v6", "ProofOfResidenceV6", "IDScanSelfieV1", "IDScanPassportV1", "IDScanV2"]>>]>, "many">; | ||
credentialSubject: import("zod").ZodObject<{ | ||
journeyId: import("zod").ZodString; | ||
}, "strip", import("zod").ZodAny, import("zod").objectOutputType<{ | ||
journeyId: import("zod").ZodString; | ||
}, import("zod").ZodAny, "strip">, import("zod").objectInputType<{ | ||
journeyId: import("zod").ZodString; | ||
}, import("zod").ZodAny, "strip">>; | ||
}, import("zod").ZodAny, "strip">[]) => void) => void; | ||
onCloseScreen: (onCloseScreenCallback: () => Promise<string>) => void; | ||
@@ -32,0 +42,0 @@ init: (options: KYCSDKInitOptions) => void; |
import { z } from "zod"; | ||
import { type DataAvailableOnInit } from "@nexeraprotocol/nexera-id-schemas/compliance/kyc"; | ||
import { type DataAvailableOnInit, type KycCompletionData } from "@nexeraprotocol/nexera-id-schemas/compliance/kyc"; | ||
export type Callbacks = { | ||
@@ -8,9 +8,5 @@ onInitKycCallback?: (data: DataAvailableOnInit) => DataAvailableOnInit; | ||
offChainShareCompletionCallback?: () => void; | ||
kycCompletionCallback?: (idScanVerifiableCredential: any, id3VerifiableCredential: any) => void; | ||
kycCompletionCallback?: (data: KycCompletionData) => void; | ||
}; | ||
export declare const KYCDataResponses: readonly ["onInitKyc", "signature"]; | ||
export declare const KYCDataResponseSchema: z.ZodEnum<["onInitKyc", "signature"]>; | ||
export type KYCDataResponse = z.infer<typeof KYCDataResponseSchema>; | ||
export declare const KYCDataMessages: readonly ["requestInitialData", "signatureRequest", "kycCompletition", "offChainShareCompletition", "closeScreen"]; | ||
export declare const KYCDataMessageSchema: z.ZodEnum<["requestInitialData", "signatureRequest", "kycCompletition", "offChainShareCompletition", "closeScreen"]>; | ||
export type KYCDataMessage = z.infer<typeof KYCDataMessageSchema>; |
@@ -1,2 +0,2 @@ | ||
import { type AvailableFlow, type DataAvailableOnInit } from "@nexeraprotocol/nexera-id-schemas/compliance/kyc"; | ||
import { type AvailableFlow, type DataAvailableOnInit, type KycCompletionData } from "@nexeraprotocol/nexera-id-schemas/compliance/kyc"; | ||
export type Auth = { | ||
@@ -16,5 +16,5 @@ accessToken: string; | ||
onSignPersonalData: (signPersonalDataCallback: (data: string) => Promise<string>) => void; | ||
onKycCompletion: (kycCompletionCallback: (idScanVerifiableCredential: any, id3VerifiableCredential: any) => void) => void; | ||
onKycCompletion: (kycCompletionCallback: (data: KycCompletionData) => void) => void; | ||
onOffChainShareCompletition: (offChainShareCompletionCallback: () => void) => void; | ||
onCloseScreen: (onCloseScreenCallback: () => Promise<string>) => void; | ||
} |
{ | ||
"name": "@nexeraid/kyc-sdk", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "Nexera ID KYC Verification SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist/nexeraprotocol-kyc-sdk.cjs.js", |
{ | ||
"name": "@nexeraid/kyc-sdk", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "Nexera ID KYC Verification SDK", | ||
@@ -23,3 +23,3 @@ "main": "dist/nexeraprotocol-kyc-sdk.cjs.js", | ||
"zod": "^3.21.4", | ||
"@nexeraprotocol/nexera-id-schemas": "1.0.12" | ||
"@nexeraprotocol/nexera-id-schemas": "1.0.13" | ||
}, | ||
@@ -26,0 +26,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101707
1997
+ Added@nexeraprotocol/nexera-id-schemas@1.0.13(transitive)
- Removed@nexeraprotocol/nexera-id-schemas@1.0.12(transitive)