@codedartdev/coinsentry-sdk 0.1.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.
Files changed (66) hide show
  1. package/README.md +271 -0
  2. package/dist/brand/config.d.ts +78 -0
  3. package/dist/brand/config.d.ts.map +1 -0
  4. package/dist/brand/config.js +274 -0
  5. package/dist/brand/config.js.map +1 -0
  6. package/dist/brand/index.d.ts +4 -0
  7. package/dist/brand/index.d.ts.map +1 -0
  8. package/dist/brand/index.js +2 -0
  9. package/dist/brand/index.js.map +1 -0
  10. package/dist/brand/types.d.ts +122 -0
  11. package/dist/brand/types.d.ts.map +1 -0
  12. package/dist/brand/types.js +2 -0
  13. package/dist/brand/types.js.map +1 -0
  14. package/dist/client.d.ts +169 -0
  15. package/dist/client.d.ts.map +1 -0
  16. package/dist/client.js +239 -0
  17. package/dist/client.js.map +1 -0
  18. package/dist/errors.d.ts +32 -0
  19. package/dist/errors.d.ts.map +1 -0
  20. package/dist/errors.js +143 -0
  21. package/dist/errors.js.map +1 -0
  22. package/dist/guards.d.ts +12 -0
  23. package/dist/guards.d.ts.map +1 -0
  24. package/dist/guards.js +76 -0
  25. package/dist/guards.js.map +1 -0
  26. package/dist/http.d.ts +38 -0
  27. package/dist/http.d.ts.map +1 -0
  28. package/dist/http.js +175 -0
  29. package/dist/http.js.map +1 -0
  30. package/dist/index.d.ts +16 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +8 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/kyc/config.d.ts +20 -0
  35. package/dist/kyc/config.d.ts.map +1 -0
  36. package/dist/kyc/config.js +224 -0
  37. package/dist/kyc/config.js.map +1 -0
  38. package/dist/kyc/flow.d.ts +37 -0
  39. package/dist/kyc/flow.d.ts.map +1 -0
  40. package/dist/kyc/flow.js +329 -0
  41. package/dist/kyc/flow.js.map +1 -0
  42. package/dist/kyc/index.d.ts +6 -0
  43. package/dist/kyc/index.d.ts.map +1 -0
  44. package/dist/kyc/index.js +4 -0
  45. package/dist/kyc/index.js.map +1 -0
  46. package/dist/kyc/locale.d.ts +17 -0
  47. package/dist/kyc/locale.d.ts.map +1 -0
  48. package/dist/kyc/locale.js +40 -0
  49. package/dist/kyc/locale.js.map +1 -0
  50. package/dist/kyc/types.d.ts +289 -0
  51. package/dist/kyc/types.d.ts.map +1 -0
  52. package/dist/kyc/types.js +2 -0
  53. package/dist/kyc/types.js.map +1 -0
  54. package/dist/products.d.ts +280 -0
  55. package/dist/products.d.ts.map +1 -0
  56. package/dist/products.js +302 -0
  57. package/dist/products.js.map +1 -0
  58. package/dist/realtime.d.ts +33 -0
  59. package/dist/realtime.d.ts.map +1 -0
  60. package/dist/realtime.js +28 -0
  61. package/dist/realtime.js.map +1 -0
  62. package/dist/types.d.ts +145 -0
  63. package/dist/types.d.ts.map +1 -0
  64. package/dist/types.js +2 -0
  65. package/dist/types.js.map +1 -0
  66. package/package.json +46 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow.js","sourceRoot":"","sources":["../../src/kyc/flow.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,mBAAmB,GAAmB;IACjD,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,iCAAiC;IAC9C,QAAQ,EAAE,oBAAoB;IAC9B,eAAe,EAAE,EAAE;IACnB,kBAAkB,EAAE,EAAE;IACtB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IAC1B,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAgC,CAAC,CAAC,CAAC,EAAE,CAAC;AACpF,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAc;IACzC,IAAI,CAAC,KAAK,CAAC,OAAO,CAA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3E,CAAC","sourcesContent":["import type {\n ClientFlowStep,\n KycCustomerType,\n KycFlowEntityType,\n KycFlowSnapshot,\n KycOverviewData,\n KycRequirements,\n KycVerificationData,\n} from './types.js';\n\nexport const VIRTUAL_REVIEW_STEP: ClientFlowStep = {\n key: 'review',\n title: 'Review',\n phase: 'compliance',\n screen: 'review',\n description: 'Review and submit verification.',\n endpoint: '/api/v1/kyc/submit',\n required_fields: [],\n required_documents: [],\n entity_types: ['PF', 'PJ'],\n blocking: true,\n};\n\nfunction asRecord(value: unknown): Record<string, unknown> {\n return value && typeof value === 'object' ? value as Record<string, unknown> : {};\n}\n\nfunction normalizeClientFlow(value: unknown): ClientFlowStep[] {\n if (!Array.isArray(value)) return [];\n\n return value\n .filter((step): step is Record<string, unknown> => Boolean(step && typeof step === 'object'))\n .flatMap((step) => {\n const key = typeof step.key === 'string' ? step.key.trim() : '';\n const screen = typeof step.screen === 'string' ? step.screen.trim() : '';\n const phase = step.phase === 'registration' || step.phase === 'compliance'\n ? step.phase\n : 'compliance';\n\n if (!key || !screen) return [];\n\n return [{\n ...step,\n key,\n title: typeof step.title === 'string' && step.title.trim() ? step.title : key,\n phase,\n screen: screen as ClientFlowStep['screen'],\n endpoint: typeof step.endpoint === 'string' ? step.endpoint : undefined,\n required_fields: Array.isArray(step.required_fields) ? step.required_fields.map(String) : [],\n required_documents: Array.isArray(step.required_documents) ? step.required_documents.map(String) : [],\n entity_types: normalizeEntityTypes(step.entity_types),\n blocking: step.blocking !== false,\n } satisfies ClientFlowStep];\n });\n}\n\nfunction normalizeEntityTypes(value: unknown): KycFlowEntityType[] {\n if (!Array.isArray(value) || value.length === 0) return ['PF', 'PJ'];\n\n const entityTypes = value\n .map((item) => String(item).trim().toUpperCase())\n .filter((item): item is KycFlowEntityType => item === 'PF' || item === 'PJ');\n\n return entityTypes.length > 0 ? entityTypes : ['PF', 'PJ'];\n}\n\nfunction normalizeJurisdictionCode(value: unknown): string | undefined {\n const normalized = String(value ?? '').trim().toUpperCase();\n return /^[A-Z]{2}$/.test(normalized) ? normalized : undefined;\n}\n\nfunction normalizeDocumentTypes(requirements: KycRequirements | null | undefined): string[] {\n const value = requirements?.document_types;\n const list = Array.isArray(value)\n ? value\n : typeof value === 'string'\n ? value.split(',')\n : [];\n\n return Array.from(new Set(\n list\n .map((type) => String(type).trim().toLowerCase())\n .filter(Boolean),\n )).sort();\n}\n\nfunction sameDocumentTypes(nextRequirements: KycRequirements, anchor: KycRequirements): boolean {\n const nextTypes = normalizeDocumentTypes(nextRequirements);\n const anchorTypes = normalizeDocumentTypes(anchor);\n if (nextTypes.length === 0 || anchorTypes.length === 0) return true;\n if (nextTypes.length !== anchorTypes.length) return false;\n return nextTypes.every((type, index) => type === anchorTypes[index]);\n}\n\nfunction anchorMatchesRequirements(nextRequirements: KycRequirements, anchor: KycRequirements): boolean {\n const nextJurisdiction = normalizeJurisdictionCode(nextRequirements.jurisdiction_code ?? nextRequirements.code);\n const anchorJurisdiction = normalizeJurisdictionCode(anchor.jurisdiction_code ?? anchor.code);\n if (nextJurisdiction && anchorJurisdiction && nextJurisdiction !== anchorJurisdiction) return false;\n\n if (\n nextRequirements.customer_type\n && anchor.customer_type\n && nextRequirements.customer_type !== anchor.customer_type\n ) {\n return false;\n }\n\n return sameDocumentTypes(nextRequirements, anchor);\n}\n\nexport function normalizeCustomerType(value: unknown): KycCustomerType {\n const normalized = String(value ?? '').trim().toLowerCase();\n return ['company', 'pj', 'business', 'legal_entity'].includes(normalized)\n ? 'company'\n : 'individual';\n}\n\nexport function flowEntityTypeForCustomerType(customerType: KycCustomerType): KycFlowEntityType {\n return customerType === 'company' ? 'PJ' : 'PF';\n}\n\nexport function getRequirementsClientFlow(requirements: KycRequirements | null | undefined): ClientFlowStep[] {\n if (!requirements) return [];\n\n const direct = normalizeClientFlow(requirements.client_flow);\n if (direct.length > 0) return direct;\n\n const nested = normalizeClientFlow(requirements.compliance_config?.client_flow);\n if (nested.length > 0) return nested;\n\n return normalizeClientFlow(requirements.flow_config?.compliance_config?.client_flow);\n}\n\nexport function hasKycClientFlow(requirements: KycRequirements | null | undefined): boolean {\n return getRequirementsClientFlow(requirements).length > 0;\n}\n\nexport function hasResolvedKycRequirements(\n requirements: KycRequirements | null | undefined,\n): requirements is KycRequirements {\n return Boolean(requirements && hasKycClientFlow(requirements));\n}\n\nexport function getComplianceSteps(\n requirements: KycRequirements | null | undefined,\n customerType: KycCustomerType,\n): ClientFlowStep[] {\n const entityType = flowEntityTypeForCustomerType(customerType);\n\n return getRequirementsClientFlow(requirements)\n .filter((step) => step.phase === 'compliance')\n .filter((step) => (step.entity_types?.length ? step.entity_types : ['PF', 'PJ']).includes(entityType));\n}\n\nexport function ensureReviewStep(steps: ClientFlowStep[], customerType: KycCustomerType): ClientFlowStep[] {\n if (steps.length === 0 || steps.some((step) => step.screen === 'review')) return steps;\n\n return [\n ...steps,\n {\n ...VIRTUAL_REVIEW_STEP,\n entity_types: [flowEntityTypeForCustomerType(customerType)],\n },\n ];\n}\n\nexport function isUniversalStepCompleted(\n step: ClientFlowStep,\n status: KycVerificationData | null | undefined,\n): boolean {\n if (!status) return false;\n return status.completed_flow_steps?.includes(step.key) ?? false;\n}\n\nfunction flowStateStepKey(status: KycVerificationData | null | undefined): string | null {\n return status?.flow_state?.required_action?.step_key\n ?? status?.flow_state?.target_flow_step\n ?? status?.flow_state?.current_step?.key\n ?? status?.flow_state?.target_step\n ?? null;\n}\n\nexport function resolveActiveKycStep(params: {\n requirements: KycRequirements | null | undefined;\n status: KycVerificationData | null | undefined;\n customerType: KycCustomerType;\n}): ClientFlowStep | null {\n if (getRequirementsClientFlow(params.requirements).length === 0) return null;\n\n const steps = ensureReviewStep(\n getComplianceSteps(params.requirements, params.customerType),\n params.customerType,\n );\n\n if (steps.length === 0) return null;\n if (params.status?.status === 'pending_review' || params.status?.status === 'under_review') return null;\n if (params.status?.status === 'approved') return null;\n\n const flowStateKey = flowStateStepKey(params.status);\n if (flowStateKey) {\n const configuredStep = steps.find((step) => step.key === flowStateKey);\n if (configuredStep) return configuredStep;\n }\n\n if (params.status?.status === 'rejected' || params.status?.status === 'requires_resubmission') {\n return steps.find((step) => step.screen !== 'review' && !isUniversalStepCompleted(step, params.status))\n ?? steps.find((step) => step.screen === 'review')\n ?? steps[0];\n }\n\n for (const step of steps) {\n if (step.screen === 'review') continue;\n if (isUniversalStepCompleted(step, params.status)) continue;\n if (step.blocking !== false) return step;\n }\n\n return steps.find((step) => step.screen === 'review') ?? steps[steps.length - 1];\n}\n\nexport function canOpenUniversalStep(params: {\n step: ClientFlowStep;\n steps: ClientFlowStep[];\n activeStep: ClientFlowStep | null;\n status: KycVerificationData | null | undefined;\n}): boolean {\n const index = params.steps.findIndex((step) => step.key === params.step.key);\n if (index < 0) return false;\n if (params.activeStep?.key === params.step.key) return true;\n if (isUniversalStepCompleted(params.step, params.status)) return true;\n\n const firstIncompleteIndex = params.steps.findIndex((step) =>\n step.screen !== 'review' && !isUniversalStepCompleted(step, params.status)\n );\n\n if (params.step.screen === 'review') return firstIncompleteIndex === -1;\n if (firstIncompleteIndex === -1) return true;\n return index <= firstIncompleteIndex;\n}\n\nexport function findStepByMissing(\n steps: ClientFlowStep[],\n missingStep?: string,\n missingScreen?: string,\n): ClientFlowStep | null {\n if (!missingStep && !missingScreen) return null;\n\n return steps.find((step) =>\n (missingStep && step.key === missingStep)\n || (missingScreen && step.screen === missingScreen)\n ) ?? null;\n}\n\nexport function getKycProgress(params: {\n steps: ClientFlowStep[];\n status: KycVerificationData | null | undefined;\n}): number {\n if (params.steps.length === 0) return 0;\n\n const completed = params.steps.filter((step) =>\n step.screen === 'review'\n ? params.status?.status === 'pending_review'\n || params.status?.status === 'under_review'\n || params.status?.status === 'approved'\n : isUniversalStepCompleted(step, params.status)\n ).length;\n\n return Math.min(100, Math.round((completed / params.steps.length) * 100));\n}\n\nexport function requirementsFromOverview(overview: KycOverviewData | null | undefined): KycRequirements | null {\n if (!overview) return null;\n\n const overviewRequirements = asRecord(overview.requirements);\n const overviewFlowConfig = asRecord(overview.flow_config);\n const requirementFlowConfig = asRecord(overviewRequirements.flow_config);\n const flowConfig = {\n ...overviewFlowConfig,\n ...requirementFlowConfig,\n };\n const requirementsSource = Object.keys(overviewRequirements).length > 0\n ? overviewRequirements\n : flowConfig;\n\n if (Object.keys(requirementsSource).length === 0) return null;\n\n const flowComplianceConfig = asRecord(asRecord(flowConfig).compliance_config);\n const requirementsComplianceConfig = asRecord(requirementsSource.compliance_config);\n const directClientFlow = normalizeClientFlow(overview.client_flow);\n const clientFlow = directClientFlow.length > 0\n ? directClientFlow\n : [\n ...normalizeClientFlow(requirementsSource.client_flow),\n ...normalizeClientFlow(requirementsComplianceConfig.client_flow),\n ...normalizeClientFlow(flowComplianceConfig.client_flow),\n ];\n const flowState = overview.flow_state ?? overview.status?.flow_state ?? null;\n const jurisdiction = asRecord(requirementsSource.jurisdiction ?? flowConfig.jurisdiction);\n const resolvedLocale = String(\n requirementsSource.locale\n ?? asRecord(overview).locale\n ?? flowConfig.locale\n ?? jurisdiction.locale\n ?? '',\n ).trim() || undefined;\n\n return {\n ...flowConfig,\n ...requirementsSource,\n jurisdiction_code: normalizeJurisdictionCode(\n requirementsSource.jurisdiction_code\n ?? requirementsSource.code\n ?? flowState?.jurisdiction_code,\n ),\n customer_type: (requirementsSource.customer_type as KycCustomerType | undefined)\n ?? normalizeCustomerType(flowState?.entity_type),\n locale: resolvedLocale,\n flow_config: {\n ...flowConfig,\n compliance_config: {\n ...flowComplianceConfig,\n client_flow: clientFlow,\n },\n },\n compliance_config: {\n ...flowComplianceConfig,\n ...requirementsComplianceConfig,\n client_flow: clientFlow,\n },\n client_flow: clientFlow,\n };\n}\n\nexport function preserveSsrKycRequirementsAnchor(\n anchor: KycRequirements,\n overviewRequirements: KycRequirements | null,\n): KycRequirements {\n const anchorClientFlow = getRequirementsClientFlow(anchor);\n\n return {\n ...anchor,\n kyc_form: overviewRequirements?.kyc_form ?? anchor.kyc_form,\n form_prefill: overviewRequirements?.form_prefill ?? anchor.form_prefill,\n read_only_fields: overviewRequirements?.read_only_fields ?? anchor.read_only_fields,\n client_flow: anchorClientFlow,\n flow_config: {\n ...(anchor.flow_config ?? {}),\n compliance_config: {\n ...(anchor.flow_config?.compliance_config ?? {}),\n client_flow: anchorClientFlow,\n },\n },\n compliance_config: {\n ...(anchor.compliance_config ?? {}),\n client_flow: anchorClientFlow,\n },\n };\n}\n\nexport function mergeKycRequirementsWithAnchor(\n nextRequirements: KycRequirements,\n anchor: KycRequirements | null,\n): KycRequirements {\n if (!anchor) return nextRequirements;\n\n const anchorClientFlow = getRequirementsClientFlow(anchor);\n const nextClientFlow = getRequirementsClientFlow(nextRequirements);\n const canUseAnchor = anchorClientFlow.length > 0\n && nextClientFlow.length === 0\n && anchorMatchesRequirements(nextRequirements, anchor);\n\n if (!canUseAnchor) return nextRequirements;\n\n return preserveSsrKycRequirementsAnchor(anchor, nextRequirements);\n}\n\nexport function statusFromOverview(overview: KycOverviewData | null | undefined): KycVerificationData | null {\n return overview?.status ?? null;\n}\n\nexport function resolveKycFlowSnapshot(input: {\n overview?: KycOverviewData | null;\n anchorRequirements?: KycRequirements | null;\n}): KycFlowSnapshot {\n const overviewRequirements = requirementsFromOverview(input.overview);\n const requirements = overviewRequirements\n ? mergeKycRequirementsWithAnchor(overviewRequirements, input.anchorRequirements ?? null)\n : input.anchorRequirements ?? null;\n const status = statusFromOverview(input.overview);\n const customerType = normalizeCustomerType(\n requirements?.customer_type\n ?? status?.flow_state?.entity_type,\n );\n const jurisdictionCode = normalizeJurisdictionCode(\n requirements?.jurisdiction_code\n ?? requirements?.code\n ?? status?.flow_state?.jurisdiction_code,\n );\n const hasConfiguredClientFlow = getRequirementsClientFlow(requirements).length > 0;\n const steps = hasConfiguredClientFlow\n ? ensureReviewStep(getComplianceSteps(requirements, customerType), customerType)\n : [];\n const activeStep = resolveActiveKycStep({ requirements, status, customerType });\n\n return {\n activeStep,\n steps,\n requirements,\n status,\n customerType,\n jurisdictionCode,\n progress: getKycProgress({ steps, status }),\n configMissing: Boolean(requirements && !hasConfiguredClientFlow),\n };\n}\n\nexport function isKycFlowSnapshotConfigured(snapshot: KycFlowSnapshot | null | undefined): boolean {\n return Boolean(snapshot && !snapshot.configMissing && snapshot.steps.length > 0);\n}\n\nexport function isKycOverviewFlowConfigured(overview: KycOverviewData | null | undefined): boolean {\n return isKycFlowSnapshotConfigured(resolveKycFlowSnapshot({ overview }));\n}\n"]}
@@ -0,0 +1,6 @@
1
+ export type { ClientFlowStep, DocumentSideChoice, DocumentTypeChoice, DocumentUploadRequirement, KycCompletedStepsData, KycCustomerType, KycCustomerRequirements, KycDocumentItem, KycFlowEntityType, KycFlowScreen, KycFlowSnapshot, KycFlowStateSummary, KycFormConfig, KycFormPrefill, KycJurisdictionSummary, KycOverviewData, KycProgress, KycRequiredAction, KycRequirements, KycRequirementsPayload, KycRuleStep, KycStringList, KycVerificationData, RegistrationDocumentConfig, RegistrationKycConfig, } from './types.js';
2
+ export { VIRTUAL_REVIEW_STEP, canOpenUniversalStep, ensureReviewStep, flowEntityTypeForCustomerType, findStepByMissing, getComplianceSteps, getKycProgress, getRequirementsClientFlow, hasKycClientFlow, hasResolvedKycRequirements, isKycFlowSnapshotConfigured, isKycOverviewFlowConfigured, isUniversalStepCompleted, mergeKycRequirementsWithAnchor, normalizeCustomerType, preserveSsrKycRequirementsAnchor, requirementsFromOverview, resolveActiveKycStep, resolveKycFlowSnapshot, statusFromOverview, } from './flow.js';
3
+ export { getKycPrefill, getKycReadOnlyFields, getRegistrationDocumentConfig, getRegistrationTaxIdField, hasRealKycPrefillValue, isKycFieldReadOnly, isRegistrationTaxIdRequired, normalizeClientFlow, normalizeClientFlowStep, normalizeDocumentTypeChoices, normalizeStringList, shouldCollectRegistrationTaxId, shouldLockKycFiscalDocumentField, uniqueDocumentChoices, } from './config.js';
4
+ export { defaultLocale, resolveKycFlowLocale, resolveKycLocale, resolveRequirementsLocale, supportedKycLocales, } from './locale.js';
5
+ export type { Locale, } from './locale.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kyc/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,6BAA6B,EAC7B,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,yBAAyB,EACzB,gBAAgB,EAChB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,8BAA8B,EAC9B,qBAAqB,EACrB,gCAAgC,EAChC,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,6BAA6B,EAC7B,yBAAyB,EACzB,sBAAsB,EACtB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,EAC5B,mBAAmB,EACnB,8BAA8B,EAC9B,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,MAAM,GACP,MAAM,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { VIRTUAL_REVIEW_STEP, canOpenUniversalStep, ensureReviewStep, flowEntityTypeForCustomerType, findStepByMissing, getComplianceSteps, getKycProgress, getRequirementsClientFlow, hasKycClientFlow, hasResolvedKycRequirements, isKycFlowSnapshotConfigured, isKycOverviewFlowConfigured, isUniversalStepCompleted, mergeKycRequirementsWithAnchor, normalizeCustomerType, preserveSsrKycRequirementsAnchor, requirementsFromOverview, resolveActiveKycStep, resolveKycFlowSnapshot, statusFromOverview, } from './flow.js';
2
+ export { getKycPrefill, getKycReadOnlyFields, getRegistrationDocumentConfig, getRegistrationTaxIdField, hasRealKycPrefillValue, isKycFieldReadOnly, isRegistrationTaxIdRequired, normalizeClientFlow, normalizeClientFlowStep, normalizeDocumentTypeChoices, normalizeStringList, shouldCollectRegistrationTaxId, shouldLockKycFiscalDocumentField, uniqueDocumentChoices, } from './config.js';
3
+ export { defaultLocale, resolveKycFlowLocale, resolveKycLocale, resolveRequirementsLocale, supportedKycLocales, } from './locale.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/kyc/index.ts"],"names":[],"mappings":"AA4BA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,6BAA6B,EAC7B,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,yBAAyB,EACzB,gBAAgB,EAChB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,8BAA8B,EAC9B,qBAAqB,EACrB,gCAAgC,EAChC,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,6BAA6B,EAC7B,yBAAyB,EACzB,sBAAsB,EACtB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,EAC5B,mBAAmB,EACnB,8BAA8B,EAC9B,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,aAAa,CAAC","sourcesContent":["export type {\n ClientFlowStep,\n DocumentSideChoice,\n DocumentTypeChoice,\n DocumentUploadRequirement,\n KycCompletedStepsData,\n KycCustomerType,\n KycCustomerRequirements,\n KycDocumentItem,\n KycFlowEntityType,\n KycFlowScreen,\n KycFlowSnapshot,\n KycFlowStateSummary,\n KycFormConfig,\n KycFormPrefill,\n KycJurisdictionSummary,\n KycOverviewData,\n KycProgress,\n KycRequiredAction,\n KycRequirements,\n KycRequirementsPayload,\n KycRuleStep,\n KycStringList,\n KycVerificationData,\n RegistrationDocumentConfig,\n RegistrationKycConfig,\n} from './types.js';\n\nexport {\n VIRTUAL_REVIEW_STEP,\n canOpenUniversalStep,\n ensureReviewStep,\n flowEntityTypeForCustomerType,\n findStepByMissing,\n getComplianceSteps,\n getKycProgress,\n getRequirementsClientFlow,\n hasKycClientFlow,\n hasResolvedKycRequirements,\n isKycFlowSnapshotConfigured,\n isKycOverviewFlowConfigured,\n isUniversalStepCompleted,\n mergeKycRequirementsWithAnchor,\n normalizeCustomerType,\n preserveSsrKycRequirementsAnchor,\n requirementsFromOverview,\n resolveActiveKycStep,\n resolveKycFlowSnapshot,\n statusFromOverview,\n} from './flow.js';\n\nexport {\n getKycPrefill,\n getKycReadOnlyFields,\n getRegistrationDocumentConfig,\n getRegistrationTaxIdField,\n hasRealKycPrefillValue,\n isKycFieldReadOnly,\n isRegistrationTaxIdRequired,\n normalizeClientFlow,\n normalizeClientFlowStep,\n normalizeDocumentTypeChoices,\n normalizeStringList,\n shouldCollectRegistrationTaxId,\n shouldLockKycFiscalDocumentField,\n uniqueDocumentChoices,\n} from './config.js';\n\nexport {\n defaultLocale,\n resolveKycFlowLocale,\n resolveKycLocale,\n resolveRequirementsLocale,\n supportedKycLocales,\n} from './locale.js';\n\nexport type {\n Locale,\n} from './locale.js';\n"]}
@@ -0,0 +1,17 @@
1
+ import type { KycRequirements, KycVerificationData } from './types.js';
2
+ export declare const defaultLocale = "pt-BR";
3
+ export declare const supportedKycLocales: readonly ["pt-BR", "en-US", "es-AR"];
4
+ export type Locale = (typeof supportedKycLocales)[number];
5
+ export declare function resolveKycLocale(input: {
6
+ locale?: unknown;
7
+ jurisdictionLocale?: unknown;
8
+ fallback?: Locale | string | null;
9
+ }): Locale;
10
+ export declare function resolveRequirementsLocale(requirements: KycRequirements | null | undefined, fallback?: Locale | string | null): Locale;
11
+ export declare function resolveKycFlowLocale(input: {
12
+ requirements?: KycRequirements | null;
13
+ status?: KycVerificationData | null;
14
+ jurisdictionCode?: string | null;
15
+ fallback?: Locale | string | null;
16
+ }): Locale;
17
+ //# sourceMappingURL=locale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../src/kyc/locale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEvE,eAAO,MAAM,aAAa,UAAU,CAAC;AACrC,eAAO,MAAM,mBAAmB,sCAAuC,CAAC;AACxE,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAuB1D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACnC,GAAG,MAAM,CAQT;AAED,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,EAChD,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAChC,MAAM,CAMR;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,YAAY,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACtC,MAAM,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACnC,GAAG,MAAM,CAOT"}
@@ -0,0 +1,40 @@
1
+ export const defaultLocale = 'pt-BR';
2
+ export const supportedKycLocales = ['pt-BR', 'en-US', 'es-AR'];
3
+ function backendLocaleToBcp47(value) {
4
+ const normalized = value?.trim().replace('_', '-');
5
+ return normalized || null;
6
+ }
7
+ function resolveSupportedLocale(value, fallback = defaultLocale) {
8
+ const normalized = backendLocaleToBcp47(value);
9
+ if (normalized && supportedKycLocales.includes(normalized)) {
10
+ return normalized;
11
+ }
12
+ return supportedKycLocales.includes(fallback) ? fallback : defaultLocale;
13
+ }
14
+ function stringValue(value) {
15
+ return typeof value === 'string' && value.trim() ? value.trim() : undefined;
16
+ }
17
+ export function resolveKycLocale(input) {
18
+ const fallback = resolveSupportedLocale(input.fallback, defaultLocale);
19
+ const explicitLocale = stringValue(input.locale) ?? stringValue(input.jurisdictionLocale);
20
+ if (explicitLocale) {
21
+ return resolveSupportedLocale(explicitLocale, fallback);
22
+ }
23
+ return fallback;
24
+ }
25
+ export function resolveRequirementsLocale(requirements, fallback) {
26
+ return resolveKycLocale({
27
+ locale: requirements?.locale,
28
+ jurisdictionLocale: requirements?.jurisdiction?.locale,
29
+ fallback,
30
+ });
31
+ }
32
+ export function resolveKycFlowLocale(input) {
33
+ const requirements = input.requirements;
34
+ return resolveKycLocale({
35
+ locale: requirements?.locale,
36
+ jurisdictionLocale: requirements?.jurisdiction?.locale,
37
+ fallback: input.fallback,
38
+ });
39
+ }
40
+ //# sourceMappingURL=locale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.js","sourceRoot":"","sources":["../../src/kyc/locale.ts"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ED,MAAM,UAAU,yBAAyB,CACvC,YAAgD,EAChD,QAAiC;IAEjC,OAAO,gBAAgB,CAAC;QACtB,MAAM,EAAE,YAAY,EAAE,MAAM;QAC5B,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM;QACtD,QAAQ;KACT,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAKpC;IACC,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IACxC,OAAO,gBAAgB,CAAC;QACtB,MAAM,EAAE,YAAY,EAAE,MAAM;QAC5B,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM;QACtD,QAAQ,EAAE,KAAK,CAAC,QAAQ;KACzB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { KycRequirements, KycVerificationData } from './types.js';\n\nexport const defaultLocale = 'pt-BR';\nexport const supportedKycLocales = ['pt-BR', 'en-US', 'es-AR'] as const;\nexport type Locale = (typeof supportedKycLocales)[number];\n\nfunction backendLocaleToBcp47(value: string | null | undefined): string | null {\n const normalized = value?.trim().replace('_', '-');\n return normalized || null;\n}\n\nfunction resolveSupportedLocale(\n value: string | null | undefined,\n fallback: Locale | string = defaultLocale,\n): Locale {\n const normalized = backendLocaleToBcp47(value);\n if (normalized && supportedKycLocales.includes(normalized as Locale)) {\n return normalized as Locale;\n }\n\n return supportedKycLocales.includes(fallback as Locale) ? fallback as Locale : defaultLocale;\n}\n\nfunction stringValue(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value.trim() : undefined;\n}\n\nexport function resolveKycLocale(input: {\n locale?: unknown;\n jurisdictionLocale?: unknown;\n fallback?: Locale | string | null;\n}): Locale {\n const fallback = resolveSupportedLocale(input.fallback, defaultLocale);\n const explicitLocale = stringValue(input.locale) ?? stringValue(input.jurisdictionLocale);\n if (explicitLocale) {\n return resolveSupportedLocale(explicitLocale, fallback);\n }\n\n return fallback;\n}\n\nexport function resolveRequirementsLocale(\n requirements: KycRequirements | null | undefined,\n fallback?: Locale | string | null,\n): Locale {\n return resolveKycLocale({\n locale: requirements?.locale,\n jurisdictionLocale: requirements?.jurisdiction?.locale,\n fallback,\n });\n}\n\nexport function resolveKycFlowLocale(input: {\n requirements?: KycRequirements | null;\n status?: KycVerificationData | null;\n jurisdictionCode?: string | null;\n fallback?: Locale | string | null;\n}): Locale {\n const requirements = input.requirements;\n return resolveKycLocale({\n locale: requirements?.locale,\n jurisdictionLocale: requirements?.jurisdiction?.locale,\n fallback: input.fallback,\n });\n}\n"]}
@@ -0,0 +1,289 @@
1
+ export type KycCustomerType = 'individual' | 'company';
2
+ export type KycFlowEntityType = 'PF' | 'PJ';
3
+ export type KycStringList = string[] | string;
4
+ export type KycFlowScreen = 'account' | 'entity_type' | 'personal_data' | 'tax_profile' | 'address' | 'document_upload' | 'selfie' | 'company_data' | 'beneficial_owners' | 'transaction_profile' | 'review' | 'email' | 'phone' | 'custom';
5
+ export type ClientFlowStep = {
6
+ key: string;
7
+ title: string;
8
+ phase: 'registration' | 'compliance';
9
+ screen: KycFlowScreen;
10
+ description?: string;
11
+ endpoint?: string;
12
+ required_fields: string[];
13
+ required_documents: string[];
14
+ entity_types: KycFlowEntityType[];
15
+ blocking: boolean;
16
+ collect_tax_id?: boolean;
17
+ document_type_options?: string[];
18
+ document_type_choices?: DocumentTypeChoice[];
19
+ document_upload_requirements?: Record<string, DocumentUploadRequirement>;
20
+ };
21
+ export type KycRuleStep = {
22
+ level: number;
23
+ name: string;
24
+ required_documents: string[];
25
+ verification_type: string;
26
+ approval_levels: number;
27
+ [key: string]: unknown;
28
+ };
29
+ export type ComplianceConfig = {
30
+ aml_screening?: boolean;
31
+ pep_screening?: boolean;
32
+ sanctions_screening?: boolean;
33
+ adverse_media_screening?: boolean;
34
+ client_flow?: ClientFlowStep[];
35
+ [key: string]: unknown;
36
+ };
37
+ export type DocumentTypeChoice = {
38
+ value: string;
39
+ label: string;
40
+ };
41
+ export type DocumentSideChoice = {
42
+ value: string;
43
+ label: string;
44
+ };
45
+ export type DocumentUploadRequirement = {
46
+ required_sides?: KycStringList;
47
+ side_choices?: DocumentSideChoice[];
48
+ instructions?: string;
49
+ [key: string]: unknown;
50
+ };
51
+ export type RegistrationDocumentConfig = {
52
+ collect_tax_id?: boolean;
53
+ field?: string;
54
+ required?: boolean;
55
+ read_only_after_registration?: boolean;
56
+ };
57
+ export type KycFormPrefill = {
58
+ jurisdiction_code?: string;
59
+ country?: string;
60
+ customer_type?: KycCustomerType;
61
+ legal_name?: string;
62
+ document_number?: string;
63
+ tax_id?: string;
64
+ document_type?: string;
65
+ [key: string]: unknown;
66
+ };
67
+ export type KycFormConfig = {
68
+ prefill?: KycFormPrefill;
69
+ read_only_fields?: KycStringList;
70
+ locked_fields?: KycStringList;
71
+ strong_read_only_fields?: KycStringList;
72
+ force_read_only_fields?: KycStringList;
73
+ forced_read_only_fields?: KycStringList;
74
+ hard_read_only_fields?: KycStringList;
75
+ field_locks?: Record<string, unknown>;
76
+ read_only_locks?: Record<string, unknown>;
77
+ };
78
+ export type KycCustomerRequirements = {
79
+ required_fields?: KycStringList;
80
+ tax_id_types?: KycStringList;
81
+ identity_documents?: KycStringList;
82
+ [key: string]: unknown;
83
+ };
84
+ export type KycJurisdictionSummary = {
85
+ code: string;
86
+ name: string;
87
+ name_local: string;
88
+ currency: string;
89
+ locale: string;
90
+ enabled: boolean;
91
+ };
92
+ export type KycRequiredAction = {
93
+ step_key?: string | null;
94
+ screen?: string | null;
95
+ endpoint?: string | null;
96
+ missing_document?: string | null;
97
+ };
98
+ export type KycFlowStateStep = {
99
+ key: string;
100
+ screen: string;
101
+ title?: string;
102
+ endpoint?: string | null;
103
+ };
104
+ export type KycFlowStateSummary = {
105
+ configured?: boolean;
106
+ jurisdiction_code?: string | null;
107
+ entity_type?: KycFlowEntityType | string;
108
+ target_step?: string | null;
109
+ target_flow_step?: string | null;
110
+ can_proceed_to_target?: boolean | null;
111
+ current_step?: KycFlowStateStep | null;
112
+ required_action?: KycRequiredAction | null;
113
+ missing_steps?: KycFlowStateStep[];
114
+ steps?: KycFlowStateStep[];
115
+ };
116
+ export type KycRequirements = {
117
+ code?: string;
118
+ jurisdiction_code?: string;
119
+ name?: string;
120
+ name_local?: string;
121
+ currency?: string;
122
+ locale?: string;
123
+ document_types?: KycStringList;
124
+ kyc_steps?: KycRuleStep[];
125
+ enabled?: boolean;
126
+ customer_type?: KycCustomerType;
127
+ rule_version_id?: number | null;
128
+ rule_set_code?: string;
129
+ version?: number;
130
+ requirements?: Partial<Record<KycCustomerType, KycCustomerRequirements>> & Record<string, unknown>;
131
+ accepted_documents?: KycStringList;
132
+ client_flow?: ClientFlowStep[];
133
+ compliance_config?: {
134
+ aml_screening?: boolean;
135
+ pep_screening?: boolean;
136
+ sanctions_screening?: boolean;
137
+ adverse_media_screening?: boolean;
138
+ client_flow?: ClientFlowStep[];
139
+ [key: string]: unknown;
140
+ };
141
+ flow_config?: {
142
+ compliance_config?: {
143
+ client_flow?: ClientFlowStep[];
144
+ [key: string]: unknown;
145
+ };
146
+ document_upload_requirements?: Record<string, DocumentUploadRequirement>;
147
+ [key: string]: unknown;
148
+ };
149
+ document_type_options?: KycStringList;
150
+ document_type_choices?: DocumentTypeChoice[];
151
+ document_upload_requirements?: Record<string, DocumentUploadRequirement>;
152
+ registration_document?: RegistrationDocumentConfig;
153
+ kyc_form?: KycFormConfig;
154
+ form_prefill?: KycFormPrefill;
155
+ read_only_fields?: KycStringList;
156
+ beneficial_owner_threshold?: number;
157
+ jurisdiction?: KycJurisdictionSummary;
158
+ source?: {
159
+ type?: string;
160
+ whitelabel_id?: number | string | null;
161
+ };
162
+ [key: string]: unknown;
163
+ };
164
+ export type KycDocumentItem = {
165
+ id: number;
166
+ document_type: string;
167
+ document_label?: string;
168
+ file_size?: number;
169
+ mime_type?: string;
170
+ status: string;
171
+ uploaded_at?: string;
172
+ created_at?: string;
173
+ expires_at?: string | null;
174
+ verified_at?: string | null;
175
+ verified_by?: string | null;
176
+ rejection_reason?: string | null;
177
+ is_expired?: boolean;
178
+ download_url?: string | null;
179
+ };
180
+ export type KycCompletedStepsData = {
181
+ email?: {
182
+ email: string;
183
+ verified_at: string | null;
184
+ };
185
+ phone?: {
186
+ phone: string;
187
+ verified_at: string | null;
188
+ };
189
+ personal_data?: {
190
+ legal_name: string | null;
191
+ document_number: string | null;
192
+ tax_id?: string | null;
193
+ document_type?: string | null;
194
+ date_of_birth: string | null;
195
+ tax_residence_country: string | null;
196
+ };
197
+ company_data?: {
198
+ legal_name?: string | null;
199
+ trade_name?: string | null;
200
+ document_number?: string | null;
201
+ opening_date?: string | null;
202
+ tax_residence_country?: string | null;
203
+ business_activity?: string | null;
204
+ };
205
+ address?: {
206
+ postal_code: string;
207
+ street: string;
208
+ number: string;
209
+ complement: string | null;
210
+ neighborhood: string;
211
+ city: string;
212
+ state: string;
213
+ country: string;
214
+ full_address: string;
215
+ };
216
+ document_photos?: KycDocumentItem[];
217
+ };
218
+ export type KycProgress = {
219
+ total_steps: number;
220
+ completed_steps: number;
221
+ percentage: number;
222
+ };
223
+ export type KycRequirementsPayload = KycRequirements & {
224
+ code: string;
225
+ name: string;
226
+ name_local: string;
227
+ currency: string;
228
+ locale: string;
229
+ document_types: string[];
230
+ kyc_steps: KycRuleStep[];
231
+ compliance_config: Required<Pick<ComplianceConfig, 'aml_screening' | 'pep_screening' | 'sanctions_screening' | 'adverse_media_screening'>> & {
232
+ client_flow: ClientFlowStep[];
233
+ [key: string]: unknown;
234
+ };
235
+ enabled: boolean;
236
+ };
237
+ export type RegistrationKycConfig = {
238
+ collectTaxId: boolean;
239
+ taxIdRequired: boolean;
240
+ jurisdictionCode: string;
241
+ documentTypesLabel: string;
242
+ taxIdTypes: string[];
243
+ locale?: string;
244
+ currency?: string;
245
+ registrationSteps?: ClientFlowStep[];
246
+ };
247
+ export type KycVerificationData = {
248
+ status: string;
249
+ level: string | number;
250
+ progress: KycProgress;
251
+ completed_steps: string[];
252
+ completed_flow_steps: string[];
253
+ completed_steps_data: KycCompletedStepsData;
254
+ flow_state?: KycFlowStateSummary | null;
255
+ started_at: string | null;
256
+ submitted_at: string | null;
257
+ approved_at: string | null;
258
+ rejected_at: string | null;
259
+ email_verified_at?: string | null;
260
+ phone_verified_at?: string | null;
261
+ date_of_birth?: string | null;
262
+ email?: string | null;
263
+ phone?: string | null;
264
+ rejection_reason?: string | null;
265
+ [key: string]: unknown;
266
+ };
267
+ export type KycOverviewData = {
268
+ status: KycVerificationData | null;
269
+ flow_state?: KycFlowStateSummary | null;
270
+ required_action?: KycRequiredAction | null;
271
+ jurisdiction_code?: string;
272
+ customer_type?: KycCustomerType;
273
+ locale?: string;
274
+ flow_config?: KycRequirements['flow_config'] | null;
275
+ client_flow?: ClientFlowStep[];
276
+ requirements?: (Partial<KycRequirements> & Record<string, unknown>) | null;
277
+ [key: string]: unknown;
278
+ };
279
+ export type KycFlowSnapshot = {
280
+ activeStep: ClientFlowStep | null;
281
+ steps: ClientFlowStep[];
282
+ requirements: KycRequirements | null;
283
+ status: KycVerificationData | null;
284
+ customerType: KycCustomerType;
285
+ jurisdictionCode?: string;
286
+ progress: number;
287
+ configMissing: boolean;
288
+ };
289
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/kyc/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,SAAS,CAAC;AACvD,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,MAAM,MAAM,aAAa,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;AAE9C,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,aAAa,GACb,eAAe,GACf,aAAa,GACb,SAAS,GACT,iBAAiB,GACjB,QAAQ,GACR,cAAc,GACd,mBAAmB,GACnB,qBAAqB,GACrB,QAAQ,GACR,OAAO,GACP,OAAO,GACP,QAAQ,CAAC;AAEb,MAAM,MAAM,c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C,OAAO,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAC3E,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAClC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,YAAY,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,eAAe,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/kyc/types.ts"],"names":[],"mappings":"","sourcesContent":["export type KycCustomerType = 'individual' | 'company';\nexport type KycFlowEntityType = 'PF' | 'PJ';\nexport type KycStringList = string[] | string;\n\nexport type KycFlowScreen =\n | 'account'\n | 'entity_type'\n | 'personal_data'\n | 'tax_profile'\n | 'address'\n | 'document_upload'\n | 'selfie'\n | 'company_data'\n | 'beneficial_owners'\n | 'transaction_profile'\n | 'review'\n | 'email'\n | 'phone'\n | 'custom';\n\nexport type ClientFlowStep = {\n key: string;\n title: string;\n phase: 'registration' | 'compliance';\n screen: KycFlowScreen;\n description?: string;\n endpoint?: string;\n required_fields: string[];\n required_documents: string[];\n entity_types: KycFlowEntityType[];\n blocking: boolean;\n collect_tax_id?: boolean;\n document_type_options?: string[];\n document_type_choices?: DocumentTypeChoice[];\n document_upload_requirements?: Record<string, DocumentUploadRequirement>;\n};\n\nexport type KycRuleStep = {\n level: number;\n name: string;\n required_documents: string[];\n verification_type: string;\n approval_levels: number;\n [key: string]: unknown;\n};\n\nexport type ComplianceConfig = {\n aml_screening?: boolean;\n pep_screening?: boolean;\n sanctions_screening?: boolean;\n adverse_media_screening?: boolean;\n client_flow?: ClientFlowStep[];\n [key: string]: unknown;\n};\n\nexport type DocumentTypeChoice = {\n value: string;\n label: string;\n};\n\nexport type DocumentSideChoice = {\n value: string;\n label: string;\n};\n\nexport type DocumentUploadRequirement = {\n required_sides?: KycStringList;\n side_choices?: DocumentSideChoice[];\n instructions?: string;\n [key: string]: unknown;\n};\n\nexport type RegistrationDocumentConfig = {\n collect_tax_id?: boolean;\n field?: string;\n required?: boolean;\n read_only_after_registration?: boolean;\n};\n\nexport type KycFormPrefill = {\n jurisdiction_code?: string;\n country?: string;\n customer_type?: KycCustomerType;\n legal_name?: string;\n document_number?: string;\n tax_id?: string;\n document_type?: string;\n [key: string]: unknown;\n};\n\nexport type KycFormConfig = {\n prefill?: KycFormPrefill;\n read_only_fields?: KycStringList;\n locked_fields?: KycStringList;\n strong_read_only_fields?: KycStringList;\n force_read_only_fields?: KycStringList;\n forced_read_only_fields?: KycStringList;\n hard_read_only_fields?: KycStringList;\n field_locks?: Record<string, unknown>;\n read_only_locks?: Record<string, unknown>;\n};\n\nexport type KycCustomerRequirements = {\n required_fields?: KycStringList;\n tax_id_types?: KycStringList;\n identity_documents?: KycStringList;\n [key: string]: unknown;\n};\n\nexport type KycJurisdictionSummary = {\n code: string;\n name: string;\n name_local: string;\n currency: string;\n locale: string;\n enabled: boolean;\n};\n\nexport type KycRequiredAction = {\n step_key?: string | null;\n screen?: string | null;\n endpoint?: string | null;\n missing_document?: string | null;\n};\n\nexport type KycFlowStateStep = {\n key: string;\n screen: string;\n title?: string;\n endpoint?: string | null;\n};\n\nexport type KycFlowStateSummary = {\n configured?: boolean;\n jurisdiction_code?: string | null;\n entity_type?: KycFlowEntityType | string;\n target_step?: string | null;\n target_flow_step?: string | null;\n can_proceed_to_target?: boolean | null;\n current_step?: KycFlowStateStep | null;\n required_action?: KycRequiredAction | null;\n missing_steps?: KycFlowStateStep[];\n steps?: KycFlowStateStep[];\n};\n\nexport type KycRequirements = {\n code?: string;\n jurisdiction_code?: string;\n name?: string;\n name_local?: string;\n currency?: string;\n locale?: string;\n document_types?: KycStringList;\n kyc_steps?: KycRuleStep[];\n enabled?: boolean;\n customer_type?: KycCustomerType;\n rule_version_id?: number | null;\n rule_set_code?: string;\n version?: number;\n requirements?: Partial<Record<KycCustomerType, KycCustomerRequirements>> & Record<string, unknown>;\n accepted_documents?: KycStringList;\n client_flow?: ClientFlowStep[];\n compliance_config?: {\n aml_screening?: boolean;\n pep_screening?: boolean;\n sanctions_screening?: boolean;\n adverse_media_screening?: boolean;\n client_flow?: ClientFlowStep[];\n [key: string]: unknown;\n };\n flow_config?: {\n compliance_config?: {\n client_flow?: ClientFlowStep[];\n [key: string]: unknown;\n };\n document_upload_requirements?: Record<string, DocumentUploadRequirement>;\n [key: string]: unknown;\n };\n document_type_options?: KycStringList;\n document_type_choices?: DocumentTypeChoice[];\n document_upload_requirements?: Record<string, DocumentUploadRequirement>;\n registration_document?: RegistrationDocumentConfig;\n kyc_form?: KycFormConfig;\n form_prefill?: KycFormPrefill;\n read_only_fields?: KycStringList;\n beneficial_owner_threshold?: number;\n jurisdiction?: KycJurisdictionSummary;\n source?: {\n type?: string;\n whitelabel_id?: number | string | null;\n };\n [key: string]: unknown;\n};\n\nexport type KycDocumentItem = {\n id: number;\n document_type: string;\n document_label?: string;\n file_size?: number;\n mime_type?: string;\n status: string;\n uploaded_at?: string;\n created_at?: string;\n expires_at?: string | null;\n verified_at?: string | null;\n verified_by?: string | null;\n rejection_reason?: string | null;\n is_expired?: boolean;\n download_url?: string | null;\n};\n\nexport type KycCompletedStepsData = {\n email?: {\n email: string;\n verified_at: string | null;\n };\n phone?: {\n phone: string;\n verified_at: string | null;\n };\n personal_data?: {\n legal_name: string | null;\n document_number: string | null;\n tax_id?: string | null;\n document_type?: string | null;\n date_of_birth: string | null;\n tax_residence_country: string | null;\n };\n company_data?: {\n legal_name?: string | null;\n trade_name?: string | null;\n document_number?: string | null;\n opening_date?: string | null;\n tax_residence_country?: string | null;\n business_activity?: string | null;\n };\n address?: {\n postal_code: string;\n street: string;\n number: string;\n complement: string | null;\n neighborhood: string;\n city: string;\n state: string;\n country: string;\n full_address: string;\n };\n document_photos?: KycDocumentItem[];\n};\n\nexport type KycProgress = {\n total_steps: number;\n completed_steps: number;\n percentage: number;\n};\n\nexport type KycRequirementsPayload = KycRequirements & {\n code: string;\n name: string;\n name_local: string;\n currency: string;\n locale: string;\n document_types: string[];\n kyc_steps: KycRuleStep[];\n compliance_config: Required<Pick<ComplianceConfig,\n | 'aml_screening'\n | 'pep_screening'\n | 'sanctions_screening'\n | 'adverse_media_screening'\n >> & {\n client_flow: ClientFlowStep[];\n [key: string]: unknown;\n };\n enabled: boolean;\n};\n\nexport type RegistrationKycConfig = {\n collectTaxId: boolean;\n taxIdRequired: boolean;\n jurisdictionCode: string;\n documentTypesLabel: string;\n taxIdTypes: string[];\n locale?: string;\n currency?: string;\n registrationSteps?: ClientFlowStep[];\n};\n\nexport type KycVerificationData = {\n status: string;\n level: string | number;\n progress: KycProgress;\n completed_steps: string[];\n completed_flow_steps: string[];\n completed_steps_data: KycCompletedStepsData;\n flow_state?: KycFlowStateSummary | null;\n started_at: string | null;\n submitted_at: string | null;\n approved_at: string | null;\n rejected_at: string | null;\n email_verified_at?: string | null;\n phone_verified_at?: string | null;\n date_of_birth?: string | null;\n email?: string | null;\n phone?: string | null;\n rejection_reason?: string | null;\n [key: string]: unknown;\n};\n\nexport type KycOverviewData = {\n status: KycVerificationData | null;\n flow_state?: KycFlowStateSummary | null;\n required_action?: KycRequiredAction | null;\n jurisdiction_code?: string;\n customer_type?: KycCustomerType;\n locale?: string;\n flow_config?: KycRequirements['flow_config'] | null;\n client_flow?: ClientFlowStep[];\n requirements?: (Partial<KycRequirements> & Record<string, unknown>) | null;\n [key: string]: unknown;\n};\n\nexport type KycFlowSnapshot = {\n activeStep: ClientFlowStep | null;\n steps: ClientFlowStep[];\n requirements: KycRequirements | null;\n status: KycVerificationData | null;\n customerType: KycCustomerType;\n jurisdictionCode?: string;\n progress: number;\n configMissing: boolean;\n};\n"]}