@lydianpay/sdk-web 3.18.7 → 3.19.0

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.
@@ -136,6 +136,11 @@ export type CustomerKYCValidationStatusResponse = {
136
136
  customerUUID: string;
137
137
  kycValidated: boolean;
138
138
  };
139
+ export type CustomerDateOfBirth = {
140
+ year: number;
141
+ month: number;
142
+ day: number;
143
+ };
139
144
  export type RedactedCustomerPIIResponse = {
140
145
  customerUUID: string;
141
146
  firstName: string;
@@ -146,10 +151,10 @@ export type RedactedCustomerPIIResponse = {
146
151
  address2: string;
147
152
  stateProvince: string;
148
153
  city: string;
149
- subdivision: string;
150
154
  country: string;
151
155
  postalCode: string;
152
156
  cityOfBirth: string;
157
+ dateOfBirth: CustomerDateOfBirth;
153
158
  };
154
159
  export type PlaceCountry = {
155
160
  name: string;
@@ -193,6 +198,7 @@ export type GetSessionResponse = {
193
198
  allowedWalletsConfig: AllowedWalletConfig[] | null;
194
199
  recommendedNetwork: string;
195
200
  merchantName?: string;
201
+ merchantCountry?: string;
196
202
  calculatedCryptoTotals?: AmountPerAsset;
197
203
  calculatedCryptoTotalsPerNetwork?: AmountPerNetworkPerAsset;
198
204
  customFlatFeePerNetwork?: AmountPerNetwork;
@@ -2,6 +2,7 @@ import type { SelectOption } from './optionFilter';
2
2
  import type { PlaceCountry } from '../types';
3
3
  export declare function isSupportedCountryCode(countryCode: string): boolean;
4
4
  export declare function countryOptions(locale?: string): SelectOption[];
5
+ export declare function getCountryName(code: string, locale?: string): string;
5
6
  export declare function getCountryOptions({ countries, locale, }: {
6
7
  countries: PlaceCountry[];
7
8
  locale?: string;
@@ -1,5 +1,5 @@
1
1
  import type { CreateTransactionResponse } from '../types';
2
- export declare const KYC_PART_ORDER: readonly ["email", "firstName", "lastName", "walletAddress", "country", "cityOfBirth", "dateOfBirth", "nationalIDNumber", "customerIDNumber", "street", "street2", "region", "city", "postalCode"];
2
+ export declare const KYC_PART_ORDER: readonly ["email", "country", "firstName", "lastName", "walletAddress", "cityOfBirth", "dateOfBirth", "nationalIDNumber", "customerIDNumber", "street", "street2", "region", "city", "postalCode"];
3
3
  export type KycFieldPart = (typeof KYC_PART_ORDER)[number];
4
4
  export declare const KYC_FIELD_ORDER: readonly ["email", "firstName", "lastName", "walletAddress", "country", "dateAndPlaceOfBirth", "cityOfBirth", "dateOfBirth", "physicalAddress", "nationalIDNumber", "customerIDNumber"];
5
5
  export type KycField = (typeof KYC_FIELD_ORDER)[number];
@@ -24,6 +24,9 @@ export type KycFormValues = Record<KycFieldPart, string> & {
24
24
  hasDocumentBack: boolean;
25
25
  };
26
26
  export declare const EMPTY_KYC_TEXT: Record<KycFieldPart, string>;
27
+ export declare function getBlankKycText({ merchantCountry, }: {
28
+ merchantCountry: string | null;
29
+ }): Record<KycFieldPart, string>;
27
30
  export type KycFieldGroup = {
28
31
  fields: KycField[];
29
32
  count: number;
@@ -49,9 +52,10 @@ export declare function getKycChoiceInputs({ group, chosenFields, }: {
49
52
  group: KycFieldGroup;
50
53
  chosenFields: KycField[];
51
54
  }): KycGroupChoice[];
52
- export declare function getInitialKycChoiceFields({ group, values, }: {
55
+ export declare function getInitialKycChoiceFields({ group, values, blankText, }: {
53
56
  group: KycFieldGroup;
54
57
  values: KycFormValues;
58
+ blankText?: Record<KycFieldPart, string>;
55
59
  }): KycField[];
56
60
  export declare function getHiddenFilledParts({ group, chosenFields, values, }: {
57
61
  group: KycFieldGroup;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import type { SelectOption } from '../optionFilter';
3
+ export default function CitizenshipField({ merchantCountry, value, countries, onChange, }: {
4
+ merchantCountry: string;
5
+ value: string;
6
+ countries: SelectOption[];
7
+ onChange: (country: string) => void;
8
+ }): React.JSX.Element;
@@ -5,6 +5,7 @@ import type { SelectOption } from '../optionFilter';
5
5
  export type KycInputProps = {
6
6
  values: KycFormValues;
7
7
  countries: SelectOption[];
8
+ merchantCountry: string | null;
8
9
  onChange: (part: KycFieldPart, value: string) => void;
9
10
  onFile: KycPartsOnFile;
10
11
  };
@@ -0,0 +1 @@
1
+ export declare function useMerchantCountry(): string | null;
@@ -4,9 +4,10 @@ import type { RedactedCustomerPIIResponse } from '../types';
4
4
  export type KycPartsOnFile = Partial<Record<KycFieldPart, string>>;
5
5
  export declare const NO_KYC_PARTS_ON_FILE: KycPartsOnFile;
6
6
  export declare function getKycPartsOnFile(onFile: RedactedCustomerPIIResponse): KycPartsOnFile;
7
- export declare function getRestoredKycDraft({ draft, partsOnFile, email, country, }: {
7
+ export declare function getStoredDateOfBirth({ dateOfBirth }: RedactedCustomerPIIResponse): string;
8
+ export declare function getRestoredKycDraft({ draft, onFile, email, country, }: {
8
9
  draft: KycDraft | null;
9
- partsOnFile: KycPartsOnFile;
10
+ onFile: RedactedCustomerPIIResponse;
10
11
  email: string;
11
12
  country: string;
12
13
  }): KycDraft;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lydianpay/sdk-web",
3
- "version": "3.18.7",
3
+ "version": "3.19.0",
4
4
  "description": "Drop-in crypto payment checkout for the web — a <lydian-checkout> web component and window.Lydian API across 20+ chains and major stablecoins.",
5
5
  "license": "MIT",
6
6
  "repository": {