@zyphe-sdk/core 0.7.0 → 0.8.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.
- package/dist/index.d.ts +142 -6
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -1
- package/dist/openapi.d.ts +111 -5
- package/dist/openapi.json +141 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -524,6 +524,29 @@ interface paths {
|
|
|
524
524
|
patch?: never;
|
|
525
525
|
trace?: never;
|
|
526
526
|
};
|
|
527
|
+
"/sdk/organizations/{organization_id}/kyb-cases/{case_id}/report": {
|
|
528
|
+
parameters: {
|
|
529
|
+
query?: never;
|
|
530
|
+
header?: never;
|
|
531
|
+
path?: never;
|
|
532
|
+
cookie?: never;
|
|
533
|
+
};
|
|
534
|
+
/**
|
|
535
|
+
* Download a KYB case's report
|
|
536
|
+
* @description The case's KYB report as a PDF: company, activity, directors, ownership and beneficial owners,
|
|
537
|
+
* screening, adverse media, documents and sources, as the case stands at the time of the request.
|
|
538
|
+
* The report is identified by a hash of its content, returned as `ETag`: send it back as
|
|
539
|
+
* `If-None-Match` to get `304` when nothing in the report has changed.
|
|
540
|
+
*/
|
|
541
|
+
get: operations["getKybCaseReport"];
|
|
542
|
+
put?: never;
|
|
543
|
+
post?: never;
|
|
544
|
+
delete?: never;
|
|
545
|
+
options?: never;
|
|
546
|
+
head?: never;
|
|
547
|
+
patch?: never;
|
|
548
|
+
trace?: never;
|
|
549
|
+
};
|
|
527
550
|
"/sdk/organizations/{organization_id}/kyb-cases/{case_id}/decision": {
|
|
528
551
|
parameters: {
|
|
529
552
|
query?: never;
|
|
@@ -1402,7 +1425,7 @@ interface components {
|
|
|
1402
1425
|
* @description The action recorded by an audit log entry (e.g. `FLOW_CREATED`).
|
|
1403
1426
|
* @enum {string}
|
|
1404
1427
|
*/
|
|
1405
|
-
AuditAction: "VIEWED" | "CREATED" | "UPDATED" | "DELETED" | "AUTH_LOGIN" | "AUTH_LOGIN_FAILED" | "AUTH_LOGOUT" | "AUTH_PASSWORD_CHANGED" | "AUTH_PASSKEY_REGISTERED" | "AUTH_MAGIC_LINK_REQUESTED" | "AUTH_PASSWORD_RESET_REQUESTED" | "AUTH_EMAIL_VERIFIED" | "IDENTITY_ROLE_CHANGED" | "IDENTITY_DEACTIVATED" | "IDENTITY_DELETED" | "ORG_CREATED" | "ORG_SETTINGS_UPDATED" | "ORG_MEMBER_INVITED" | "ORG_MEMBER_REMOVED" | "ORG_MEMBER_ROLE_CHANGED" | "ORG_INVITE_REVOKED" | "API_KEY_CREATED" | "API_KEY_UPDATED" | "API_KEY_DELETED" | "BOT_CREATED" | "BOT_DELETED" | "BOT_TOKEN_REGENERATED" | "FLOW_CREATED" | "FLOW_UPDATED" | "FLOW_LINK_CREATED" | "FLOW_DELETED" | "FLOW_STEP_ADDED" | "FLOW_STEP_UPDATED" | "FLOW_STEP_DELETED" | "FLOW_SHARED" | "FLOW_SHARE_REVOKED" | "PARTNER_INVITED" | "PARTNER_INVITE_ACCEPTED" | "PARTNER_INVITE_REVOKED" | "PARTNER_INVITE_REJECTED" | "VR_CREATED" | "VR_STATUS_CHANGED" | "VR_MANUALLY_REVIEWED" | "DV_RESULT_REVIEW_REQUESTED" | "VR_CANCELLED" | "DV_RESULT_STATUS_CHANGED" | "DV_RESULT_MANUAL_REVIEW" | "DV_RESULT_REPLAYED" | "AML_RESULT_STATUS_CHANGED" | "AML_RESULT_MODERATED" | "AML_FIELD_REVIEWED" | "AML_AGENT_REVIEWED" | "AML_SCREENED" | "TIN_CHECK_RUN" | "POA_RESULT_STATUS_CHANGED" | "SPID_RESULT_STATUS_CHANGED" | "FORM_RESULT_STATUS_CHANGED" | "FORM_RESULT_SUBMITTED" | "KYB_APPLICATION_SUBMITTED" | "KYB_DOCUMENT_REQUEST_CREATED" | "KYB_DOCUMENT_UPLOADED" | "KYB_CLARIFICATION_SUBMITTED" | "KYB_DOCUMENT_REQUEST_REVIEWED" | "KYB_ASSIGNED" | "KYB_STAGE_CHANGED" | "KYB_COMMUNICATION_SENT" | "KYB_MODERATION_STATUS_UPDATED" | "KYB_PEP_SANCTIONS_STATUS_UPDATED" | "KYB_REPORT_UPLOADED" | "KYB_AUTO_COMPLETED" | "KYB_APPROVED" | "KYB_MANUAL_REVIEW_DECISION" | "KYB_VERIFICATION_FIELD_OVERRIDDEN" | "KYB_DOCUMENT_CHECK_OVERRIDDEN" | "KYB_METADATA_PATCHED" | "KYB_SCREENING_STRATEGY_CHANGED" | "KYB_BUSINESS_INFORMATION_EDITED" | "KYB_UBOS_ADDED" | "KYB_UBO_REMOVED" | "KYB_DIRECTORS_ADDED" | "KYB_DIRECTOR_REMOVED" | "KYB_AGENT_REVIEWED" | "KYB_DOCUMENT_CATALOG_REFRESHED" | "KYB_DOCUMENTS_PURCHASED" | "KYB_CASE_MANIFEST_REVISED" | "KYB_CASE_RUN_COMPLETED" | "KYB_CASE_RUN_FAILED" | "KYB_CASE_RUN_REAPED" | "KYB_CASE_RUN_REQUEUED" | "KYB_CASE_EFFECTS_ABANDONED" | "KYB_CASE_RETRY_FORCED" | "KYB_CASE_DECISION_REPORT_HELD" | "KYB_CASE_WAIVER_DECIDED" | "KYB_CASE_DECIDED" | "KYB_CASE_EXCEPTION_RECORDED" | "KYB_CASE_EXCEPTION_WITHDRAWN" | "KYB_CASE_DECISION_PROPOSAL_WITHDRAWN" | "KYB_SCREENING_HIT_RESOLVED" | "KYB_SCREENING_HIT_PROPOSED" | "KYB_CASE_CHECK_CONFIRMED" | "KYB_CASE_REOPENED" | "KYB_CASE_QUALITY_REVIEW_RECORDED" | "KYB_OWNERSHIP_CONFIRMATION_SUBMITTED" | "KYB_SUBJECT_ASSIGNED" | "KYB_SUBJECT_RELEASED" | "KYB_COMPANY_RATING_OVERRIDDEN" | "KYB_COMPANY_RATING_OVERRIDE_ENDED" | "COMPLIANCE_POLICY_UPDATED" | "COMPLIANCE_POLICY_DRAFT_SAVED" | "COMPLIANCE_POLICY_PUBLISHED" | "COMPLIANCE_POLICY_PUT_IN_FORCE" | "COMPLIANCE_POLICY_SOP_UPLOADED" | "COMPLIANCE_POLICY_SOP_REVIEWED" | "KYB_CASE_AML_DISPOSITIONED" | "KYB_CASE_STEP_PROPOSAL_DECIDED" | "KYB_CASE_CLARIFICATION_PROPOSAL_DECIDED" | "KYB_CASE_FACT_RECORDED" | "KYB_CASE_INVITATION_SENT" | "KYB_CASE_INVITATION_FAILED" | "KYC_GRANT_CREATED" | "CONSENT_GRANTED" | "BLOCKLIST_ENTRY_CREATED" | "BLOCKLIST_ENTRY_DELETED" | "RISK_WEIGHT_UPDATED" | "RISK_FACTOR_UPDATED" | "DOCUMENT_DOWNLOADED" | "FLOW_RESULT_EXPORTED" | "FLOW_RISK_SCORE_CHANGED" | "FLOW_RISK_STATUS_CHANGED" | "RISK_TAG_ADDED" | "RISK_TAG_RETRACTED" | "TM_RULE_TRIGGERED" | "TM_ALERT_RAISED" | "TM_AGENT_REVIEWED" | "TM_AGENT_REVIEW_STARTED" | "TM_AGENT_RESOLVED" | "TM_ALERT_DISPOSITIONED" | "TM_ALERT_ESCALATED" | "TM_RULE_DISABLED" | "UNKNOWN";
|
|
1428
|
+
AuditAction: "VIEWED" | "CREATED" | "UPDATED" | "DELETED" | "AUTH_LOGIN" | "AUTH_LOGIN_FAILED" | "AUTH_LOGOUT" | "AUTH_PASSWORD_CHANGED" | "AUTH_PASSKEY_REGISTERED" | "AUTH_MAGIC_LINK_REQUESTED" | "AUTH_PASSWORD_RESET_REQUESTED" | "AUTH_EMAIL_VERIFIED" | "IDENTITY_ROLE_CHANGED" | "IDENTITY_DEACTIVATED" | "IDENTITY_DELETED" | "ORG_CREATED" | "ORG_SETTINGS_UPDATED" | "ORG_MEMBER_INVITED" | "ORG_MEMBER_REMOVED" | "ORG_MEMBER_ROLE_CHANGED" | "ORG_INVITE_REVOKED" | "API_KEY_CREATED" | "API_KEY_UPDATED" | "API_KEY_DELETED" | "BOT_CREATED" | "BOT_DELETED" | "BOT_TOKEN_REGENERATED" | "FLOW_CREATED" | "FLOW_UPDATED" | "FLOW_LINK_CREATED" | "FLOW_DELETED" | "FLOW_STEP_ADDED" | "FLOW_STEP_UPDATED" | "FLOW_STEP_DELETED" | "FLOW_SHARED" | "FLOW_SHARE_REVOKED" | "PARTNER_INVITED" | "PARTNER_INVITE_ACCEPTED" | "PARTNER_INVITE_REVOKED" | "PARTNER_INVITE_REJECTED" | "VR_CREATED" | "VR_STATUS_CHANGED" | "VR_MANUALLY_REVIEWED" | "DV_RESULT_REVIEW_REQUESTED" | "VR_CANCELLED" | "DV_RESULT_STATUS_CHANGED" | "DV_RESULT_MANUAL_REVIEW" | "DV_RESULT_REPLAYED" | "AML_RESULT_STATUS_CHANGED" | "AML_RESULT_MODERATED" | "AML_FIELD_REVIEWED" | "AML_AGENT_REVIEWED" | "AML_SCREENED" | "TIN_CHECK_RUN" | "POA_RESULT_STATUS_CHANGED" | "SPID_RESULT_STATUS_CHANGED" | "FORM_RESULT_STATUS_CHANGED" | "FORM_RESULT_SUBMITTED" | "KYB_APPLICATION_SUBMITTED" | "KYB_DOCUMENT_REQUEST_CREATED" | "KYB_DOCUMENT_UPLOADED" | "KYB_CLARIFICATION_SUBMITTED" | "KYB_DOCUMENT_REQUEST_REVIEWED" | "KYB_ASSIGNED" | "KYB_STAGE_CHANGED" | "KYB_COMMUNICATION_SENT" | "KYB_MODERATION_STATUS_UPDATED" | "KYB_PEP_SANCTIONS_STATUS_UPDATED" | "KYB_REPORT_UPLOADED" | "KYB_AUTO_COMPLETED" | "KYB_APPROVED" | "KYB_MANUAL_REVIEW_DECISION" | "KYB_VERIFICATION_FIELD_OVERRIDDEN" | "KYB_DOCUMENT_CHECK_OVERRIDDEN" | "KYB_METADATA_PATCHED" | "KYB_SCREENING_STRATEGY_CHANGED" | "KYB_BUSINESS_INFORMATION_EDITED" | "KYB_UBOS_ADDED" | "KYB_UBO_REMOVED" | "KYB_DIRECTORS_ADDED" | "KYB_DIRECTOR_REMOVED" | "KYB_AGENT_REVIEWED" | "KYB_AGENT_RUN_ENDED" | "KYB_CASE_DOSSIER_EXPORTED" | "KYB_CASE_REPORT_DOWNLOADED" | "KYB_DOCUMENT_CATALOG_REFRESHED" | "KYB_DOCUMENTS_PURCHASED" | "KYB_CASE_MANIFEST_REVISED" | "KYB_CASE_RUN_COMPLETED" | "KYB_CASE_RUN_FAILED" | "KYB_CASE_RUN_REAPED" | "KYB_CASE_RUN_REQUEUED" | "KYB_CASE_RUN_SUPERSEDED" | "KYB_CASE_EFFECTS_ABANDONED" | "KYB_CASE_RETRY_FORCED" | "KYB_CASE_DECISION_REPORT_HELD" | "KYB_CASE_WAIVER_DECIDED" | "KYB_CASE_DECIDED" | "KYB_CASE_EXCEPTION_RECORDED" | "KYB_CASE_EXCEPTION_WITHDRAWN" | "KYB_CASE_DECISION_PROPOSAL_WITHDRAWN" | "KYB_SCREENING_HIT_RESOLVED" | "KYB_SCREENING_HIT_PROPOSED" | "KYB_CASE_CHECK_CONFIRMED" | "KYB_CASE_REOPENED" | "KYB_CASE_QUALITY_REVIEW_RECORDED" | "KYB_OWNERSHIP_CONFIRMATION_SUBMITTED" | "KYB_SUBJECT_ASSIGNED" | "KYB_SUBJECT_RELEASED" | "KYB_COMPANY_RATING_OVERRIDDEN" | "KYB_COMPANY_RATING_OVERRIDE_ENDED" | "COMPLIANCE_POLICY_UPDATED" | "COMPLIANCE_POLICY_DRAFT_SAVED" | "COMPLIANCE_POLICY_PUBLISHED" | "COMPLIANCE_POLICY_PUT_IN_FORCE" | "COMPLIANCE_POLICY_SOP_UPLOADED" | "COMPLIANCE_POLICY_SOP_REVIEWED" | "KYB_CASE_AML_DISPOSITIONED" | "KYB_CASE_STEP_PROPOSAL_DECIDED" | "KYB_CASE_CLARIFICATION_PROPOSAL_DECIDED" | "KYB_CASE_FACT_RECORDED" | "KYB_CASE_INVITATION_SENT" | "KYB_CASE_INVITATION_FAILED" | "KYC_GRANT_CREATED" | "CONSENT_GRANTED" | "BLOCKLIST_ENTRY_CREATED" | "BLOCKLIST_ENTRY_DELETED" | "RISK_WEIGHT_UPDATED" | "RISK_FACTOR_UPDATED" | "DOCUMENT_DOWNLOADED" | "FLOW_RESULT_EXPORTED" | "FLOW_RISK_SCORE_CHANGED" | "FLOW_RISK_STATUS_CHANGED" | "RISK_TAG_ADDED" | "RISK_TAG_RETRACTED" | "TM_RULE_TRIGGERED" | "TM_ALERT_RAISED" | "TM_AGENT_REVIEWED" | "TM_AGENT_REVIEW_STARTED" | "TM_AGENT_RESOLVED" | "TM_ALERT_DISPOSITIONED" | "TM_ALERT_ESCALATED" | "TM_RULE_DISABLED" | "UNKNOWN";
|
|
1406
1429
|
/** @description A single entry in the audit log, returned by the query API. */
|
|
1407
1430
|
AuditLogEntry: {
|
|
1408
1431
|
action: components["schemas"]["AuditAction"];
|
|
@@ -1414,6 +1437,12 @@ interface components {
|
|
|
1414
1437
|
/** Format: date-time */
|
|
1415
1438
|
createdAt: string;
|
|
1416
1439
|
details: unknown;
|
|
1440
|
+
/**
|
|
1441
|
+
* Format: int64
|
|
1442
|
+
* @description The entry's position on the audit log's hash chain. One entry is read back with the filter
|
|
1443
|
+
* `entry_seq:equals:<n>`.
|
|
1444
|
+
*/
|
|
1445
|
+
entrySeq: number;
|
|
1417
1446
|
/** Format: uuid */
|
|
1418
1447
|
id: string;
|
|
1419
1448
|
/** @description Whether this entry originated from a sandbox operation.
|
|
@@ -1473,7 +1502,7 @@ interface components {
|
|
|
1473
1502
|
* not be determined (e.g. for some system operations).
|
|
1474
1503
|
* @enum {string}
|
|
1475
1504
|
*/
|
|
1476
|
-
AuditResourceType: "Search" | "Identity" | "Organization" | "OrganizationSettings" | "OrganizationTheme" | "OrganizationInvite" | "OrganizationBilling" | "SubscriptionPlan" | "KybJurisdictionPricing" | "TopupPack" | "ApiKey" | "Bot" | "Flow" | "FlowStep" | "FlowResult" | "FlowPartnerInvite" | "VerificationRequest" | "DvResult" | "AmlResult" | "TinCheck" | "PoaResult" | "KybResult" | "KybCase" | "KybCaseRule" | "KybCompanyRating" | "KybSubjectAssignment" | "FormResult" | "Form" | "RiskWeight" | "ContextualFactor" | "ScoreDefinition" | "ScoreTag" | "ScoreRule" | "AuditLog" | "ChatMessage" | "DocumentSelection" | "GeolocationResult" | "PhoneVerification" | "SpidResult" | "WalletVerification" | "Vault" | "KybUboData" | "DocumentDefinition" | "ConfigOverride" | "AgentReviewPolicy" | "ShortUrl" | "Cache" | "Transaction" | "TmRule" | "TmList" | "TmSettings" | "TmAlert" | "TmRuleTemplate" | "DisposableEmailDomain" | "RegistrationOffer" | "RegistrationOfferLink" | "WebhookEndpoint" | "WebhookOrganizationSecret" | "Unknown";
|
|
1505
|
+
AuditResourceType: "Search" | "Identity" | "Organization" | "OrganizationSettings" | "OrganizationTheme" | "OrganizationInvite" | "OrganizationBilling" | "SubscriptionPlan" | "KybJurisdictionPricing" | "TopupPack" | "ApiKey" | "Bot" | "McpClient" | "Flow" | "FlowStep" | "FlowResult" | "FlowPartnerInvite" | "VerificationRequest" | "DvResult" | "AmlResult" | "TinCheck" | "PoaResult" | "KybResult" | "KybCase" | "KybCaseRule" | "KybCompanyRating" | "KybSubjectAssignment" | "FormResult" | "Form" | "RiskWeight" | "ContextualFactor" | "ScoreDefinition" | "ScoreTag" | "ScoreRule" | "AuditLog" | "ChatMessage" | "DocumentSelection" | "GeolocationResult" | "PhoneVerification" | "SpidResult" | "WalletVerification" | "Vault" | "KybUboData" | "DocumentDefinition" | "ConfigOverride" | "AgentReviewPolicy" | "ShortUrl" | "Cache" | "Transaction" | "TmRule" | "TmList" | "TmSettings" | "TmAlert" | "TmRuleTemplate" | "DisposableEmailDomain" | "RegistrationOffer" | "RegistrationOfferLink" | "WebhookEndpoint" | "WebhookOrganizationSecret" | "Unknown";
|
|
1477
1506
|
/** @description What triggered an audit event, identified by `type`:
|
|
1478
1507
|
* - `HTTP` — an API request (`method` and `path`).
|
|
1479
1508
|
* - `WORKER` — a background process (`workerType` and `scenario`).
|
|
@@ -2600,7 +2629,7 @@ interface components {
|
|
|
2600
2629
|
number: number;
|
|
2601
2630
|
};
|
|
2602
2631
|
/** @enum {string} */
|
|
2603
|
-
ErrorTags: "unexpected" | "bad_request" | "permission_denied" | "request_deserialization" | "database" | "invalid_email_or_password" | "user_not_confirmed" | "verify_password" | "send_email" | "open_session" | "read_session" | "close_session" | "user_disabled" | "missing_authorization_header" | "invalid_authorization_header" | "token_generation" | "user_not_found" | "email_already_taken" | "invalid_invite" | "wrong_invite_user" | "invite_not_found" | "email_already_verified" | "flow_not_found" | "flow_step_not_found" | "organization_not_found" | "storage" | "verification_request_not_found" | "document_reader" | "sse" | "organization_settings_not_found" | "theme_not_found" | "start_job" | "result_not_found" | "kyc_grant_not_found" | "document_not_found" | "service_invocation" | "trigger_webhook" | "too_many_invites" | "invite_already_used" | "invite_already_accepted" | "invite_already_revoked" | "invite_revoked" | "invite_expired" | "invite_already_exists" | "share_already_revoked" | "form_not_found" | "form_in_use" | "flow_step_configuration_not_found" | "identity_not_found" | "step_order_violation" | "serialization" | "mock_data" | "api_key_not_found" | "not_implemented" | "access_grant" | "rate_limit_exceeded" | "missing_api_key" | "invalid_api_key" | "origin_not_allowed" | "step_already_completed" | "send_sms" | "send_notification" | "parse_error" | "inviter_organization_not_found" | "forbidden" | "passkey_authentication" | "internal" | "invalid_email" | "disposable_email" | "graph_validation" | "external_api" | "share_already_has_write_access" | "share_does_not_have_write_access" | "write_access_already_revoked" | "invite_required" | "billing" | "billing_email_required" | "product_not_active" | "registration_offer_not_found" | "registration_offer_unavailable" | "registration_offer_invalid_terms" | "topup_pack_unlocks_unpriced" | "score_rule_not_found" | "score_rule_field_outside_scores" | "score_rule_unknown_score" | "score_rule_score_disabled" | "score_rule_score_not_yet_computed" | "score_rule_set_score_out_of_range" | "score_rule_effect_kind_mismatch" | "kyb_case_not_decidable" | "kyb_case_not_ready" | "kyb_case_exception_required" | "kyb_case_rejecting_hit" | "kyb_case_reason_required" | "kyb_case_decision_not_authorized" | "kyb_case_second_signature_required" | "compliance_policy_open_questions" | "tin_check_invalid_tin" | "tin_check_unavailable" | "tin_check_ein_required" | "tin_check_mismatch" | "tin_check_attempts_exhausted";
|
|
2632
|
+
ErrorTags: "unexpected" | "bad_request" | "permission_denied" | "request_deserialization" | "database" | "invalid_email_or_password" | "user_not_confirmed" | "verify_password" | "send_email" | "open_session" | "read_session" | "close_session" | "user_disabled" | "missing_authorization_header" | "invalid_authorization_header" | "token_generation" | "user_not_found" | "email_already_taken" | "invalid_invite" | "wrong_invite_user" | "invite_not_found" | "email_already_verified" | "flow_not_found" | "flow_step_not_found" | "organization_not_found" | "organization_under_retention" | "storage" | "verification_request_not_found" | "document_reader" | "sse" | "organization_settings_not_found" | "theme_not_found" | "start_job" | "result_not_found" | "kyc_grant_not_found" | "document_not_found" | "service_invocation" | "trigger_webhook" | "too_many_invites" | "invite_already_used" | "invite_already_accepted" | "invite_already_revoked" | "invite_revoked" | "invite_expired" | "invite_already_exists" | "share_already_revoked" | "form_not_found" | "form_in_use" | "flow_step_configuration_not_found" | "identity_not_found" | "step_order_violation" | "serialization" | "mock_data" | "api_key_not_found" | "not_implemented" | "access_grant" | "rate_limit_exceeded" | "missing_api_key" | "invalid_api_key" | "origin_not_allowed" | "step_already_completed" | "send_sms" | "send_notification" | "parse_error" | "inviter_organization_not_found" | "forbidden" | "passkey_authentication" | "internal" | "invalid_email" | "disposable_email" | "graph_validation" | "external_api" | "share_already_has_write_access" | "share_does_not_have_write_access" | "write_access_already_revoked" | "invite_required" | "billing" | "billing_email_required" | "product_not_active" | "registration_offer_not_found" | "registration_offer_unavailable" | "registration_offer_invalid_terms" | "topup_pack_unlocks_unpriced" | "score_rule_not_found" | "score_rule_field_outside_scores" | "score_rule_unknown_score" | "score_rule_score_disabled" | "score_rule_score_not_yet_computed" | "score_rule_set_score_out_of_range" | "score_rule_effect_kind_mismatch" | "kyb_case_not_decidable" | "kyb_case_not_ready" | "kyb_case_exception_required" | "kyb_case_rejecting_hit" | "kyb_case_reason_required" | "kyb_case_decision_not_authorized" | "kyb_case_second_signature_required" | "compliance_policy_open_questions" | "tin_check_invalid_tin" | "tin_check_unavailable" | "tin_check_ein_required" | "tin_check_mismatch" | "tin_check_attempts_exhausted";
|
|
2604
2633
|
/**
|
|
2605
2634
|
* @description What an estimated cost represents. `fixedPrice` is a real quoted price; `variableCap` is only
|
|
2606
2635
|
* the maximum that may be charged, because the actual cost varies; `unknown` means pricing could
|
|
@@ -3863,6 +3892,12 @@ interface components {
|
|
|
3863
3892
|
* @enum {string}
|
|
3864
3893
|
*/
|
|
3865
3894
|
KybCasePlannerMode: "DISABLED" | "SUGGEST" | "AUTO_PILOT";
|
|
3895
|
+
/**
|
|
3896
|
+
* Format: binary
|
|
3897
|
+
* @description The case's KYB report: the PDF file itself, sent as the response body. Described as binary so
|
|
3898
|
+
* generated clients read it as a file rather than as JSON.
|
|
3899
|
+
*/
|
|
3900
|
+
KybCaseReportPdf: Blob;
|
|
3866
3901
|
/**
|
|
3867
3902
|
* @description The lifecycle status of a KYB case. `APPROVED`, `REJECTED` and `CANCELLED` close the case; a
|
|
3868
3903
|
* closed case can later be reopened (for example when the applicant resubmits or a periodic
|
|
@@ -4208,8 +4243,9 @@ interface components {
|
|
|
4208
4243
|
* regress a discovery-backed flow's UBOs part back to awaiting-client when the graph produced
|
|
4209
4244
|
* nothing usable.
|
|
4210
4245
|
* - `DirectorDeclaration` — same as `UboDeclaration`, for the `KYB_DIRECTORS` satellite.
|
|
4211
|
-
* - `OwnershipConfirmation` — opened by a reopening (a quality
|
|
4212
|
-
* periodic review),
|
|
4246
|
+
* - `OwnershipConfirmation` — opened by the platform, never by hand: by a reopening (a quality
|
|
4247
|
+
* review's disagreement or the periodic review), or by owners the company register reports that
|
|
4248
|
+
* the declaration left out. The company is asked to confirm, through the existing request
|
|
4213
4249
|
* link, that the owners and officers on file are still the ones there are. The answer lands as
|
|
4214
4250
|
* the applicant's own assertions; while it is open the case waits on the applicant, and
|
|
4215
4251
|
* deciding without it takes an exception like any other open request.
|
|
@@ -7885,6 +7921,76 @@ interface operations {
|
|
|
7885
7921
|
};
|
|
7886
7922
|
};
|
|
7887
7923
|
};
|
|
7924
|
+
getKybCaseReport: {
|
|
7925
|
+
parameters: {
|
|
7926
|
+
query: {
|
|
7927
|
+
sandbox: boolean;
|
|
7928
|
+
locale?: components["schemas"]["Locale"];
|
|
7929
|
+
};
|
|
7930
|
+
header?: {
|
|
7931
|
+
/** @description The `ETag` of a report already held */
|
|
7932
|
+
"If-None-Match"?: string | null;
|
|
7933
|
+
};
|
|
7934
|
+
path: {
|
|
7935
|
+
/** @description Organization ID */
|
|
7936
|
+
organization_id: string;
|
|
7937
|
+
/** @description The ID of the KYB case */
|
|
7938
|
+
case_id: string;
|
|
7939
|
+
};
|
|
7940
|
+
cookie?: never;
|
|
7941
|
+
};
|
|
7942
|
+
requestBody?: never;
|
|
7943
|
+
responses: {
|
|
7944
|
+
/** @description The report PDF */
|
|
7945
|
+
200: {
|
|
7946
|
+
headers: {
|
|
7947
|
+
[name: string]: unknown;
|
|
7948
|
+
};
|
|
7949
|
+
content: {
|
|
7950
|
+
"application/pdf": components["schemas"]["KybCaseReportPdf"];
|
|
7951
|
+
};
|
|
7952
|
+
};
|
|
7953
|
+
/** @description The report named by `If-None-Match` is current */
|
|
7954
|
+
304: {
|
|
7955
|
+
headers: {
|
|
7956
|
+
[name: string]: unknown;
|
|
7957
|
+
};
|
|
7958
|
+
content?: never;
|
|
7959
|
+
};
|
|
7960
|
+
401: {
|
|
7961
|
+
headers: {
|
|
7962
|
+
[name: string]: unknown;
|
|
7963
|
+
};
|
|
7964
|
+
content: {
|
|
7965
|
+
"application/json": components["schemas"]["BaxeError"];
|
|
7966
|
+
};
|
|
7967
|
+
};
|
|
7968
|
+
403: {
|
|
7969
|
+
headers: {
|
|
7970
|
+
[name: string]: unknown;
|
|
7971
|
+
};
|
|
7972
|
+
content: {
|
|
7973
|
+
"application/json": components["schemas"]["BaxeError"];
|
|
7974
|
+
};
|
|
7975
|
+
};
|
|
7976
|
+
404: {
|
|
7977
|
+
headers: {
|
|
7978
|
+
[name: string]: unknown;
|
|
7979
|
+
};
|
|
7980
|
+
content: {
|
|
7981
|
+
"application/json": components["schemas"]["BaxeError"];
|
|
7982
|
+
};
|
|
7983
|
+
};
|
|
7984
|
+
500: {
|
|
7985
|
+
headers: {
|
|
7986
|
+
[name: string]: unknown;
|
|
7987
|
+
};
|
|
7988
|
+
content: {
|
|
7989
|
+
"application/json": components["schemas"]["BaxeError"];
|
|
7990
|
+
};
|
|
7991
|
+
};
|
|
7992
|
+
};
|
|
7993
|
+
};
|
|
7888
7994
|
decideKybCase: {
|
|
7889
7995
|
parameters: {
|
|
7890
7996
|
query: {
|
|
@@ -10962,6 +11068,36 @@ declare function getKybCase({ organizationId, caseId, isSandbox, locale }: KybCa
|
|
|
10962
11068
|
"x-api-key": string;
|
|
10963
11069
|
};
|
|
10964
11070
|
}, `${string}/${string}`>>;
|
|
11071
|
+
interface GetKybCaseReportParams extends KybCaseParams {
|
|
11072
|
+
/**
|
|
11073
|
+
* The `etag` of a report you already hold. When nothing in the report has changed, the call answers with
|
|
11074
|
+
* `notModified: true` and no body.
|
|
11075
|
+
* @example '"19ad76209a1f705468dc687ebd94ac63ca3d843b62b2f8bb8b713d1e6abb1a46-v1"'
|
|
11076
|
+
*/
|
|
11077
|
+
ifNoneMatch?: string;
|
|
11078
|
+
}
|
|
11079
|
+
/**
|
|
11080
|
+
* Downloads the KYB case report as a PDF: the company, its people and ownership, screening, adverse media, documents
|
|
11081
|
+
* and sources, as the case stands at the time of the call.
|
|
11082
|
+
*
|
|
11083
|
+
* The report is identified by a hash of its content, returned as `etag`. Pass it back as `ifNoneMatch` to download the
|
|
11084
|
+
* report again only when it has changed.
|
|
11085
|
+
*
|
|
11086
|
+
* The body is a PDF, not JSON: a direct `openapi-fetch` call to this endpoint must set `parseAs: 'arrayBuffer'` (or
|
|
11087
|
+
* `'blob'`), as this helper does, instead of relying on the default JSON parser.
|
|
11088
|
+
*/
|
|
11089
|
+
declare function getKybCaseReport({ organizationId, caseId, isSandbox, locale, ifNoneMatch }: GetKybCaseReportParams, opts: SDKOptions): Promise<{
|
|
11090
|
+
data: Uint8Array<ArrayBuffer> | undefined;
|
|
11091
|
+
error: {
|
|
11092
|
+
code: number;
|
|
11093
|
+
errorTag: components["schemas"]["ErrorTags"];
|
|
11094
|
+
message?: string | null;
|
|
11095
|
+
} | undefined;
|
|
11096
|
+
response: Response;
|
|
11097
|
+
notModified: boolean;
|
|
11098
|
+
etag: string | undefined;
|
|
11099
|
+
fileName: string | undefined;
|
|
11100
|
+
}>;
|
|
10965
11101
|
type DecideKybCaseParams = KybCaseParams & components['schemas']['DecideCasePayload'];
|
|
10966
11102
|
declare function decideKybCase({ organizationId, caseId, isSandbox, locale, outcome, reason, reasonCode, dueDiligenceLevel, confirmingProposalId }: DecideKybCaseParams, opts: SDKOptions): Promise<openapi_fetch.FetchResponse<{
|
|
10967
11103
|
parameters: {
|
|
@@ -12549,4 +12685,4 @@ interface WebhookVerifierOptions<T extends WebhookUnauthorizedHandler> {
|
|
|
12549
12685
|
exposeRawBody?: boolean;
|
|
12550
12686
|
}
|
|
12551
12687
|
|
|
12552
|
-
export { API_KEY_HEADER, type ApiKeyType, type BaxeError, type CompleteLivenessStepParams, type CreateVerificationSessionParams, DocumentType, type Environment, EnvironmentConfigs, Environments, type Flow, type FlowStep, type FlowStepType, type GetLivenessChallengeOptions, type GetLivenessChallengeResponse, type GetNextStepDetailsParams, type InitializeZypheFlowParams, type Locale, type ProcessDocumentSelectionOptions, type ProcessDocumentSelectionPayload, type ProcessDocumentSelectionRequestPayload, type ProcessDocumentSelectionResponse, type ProcessDvDocumentOptions, type ProcessDvDocumentPayload, type ProcessDvLivenessOptions, type ProcessDvLivenessParams, type ProcessIdentityDocumentPayload, type ProcessIdentityDocumentResponse, type ProcessLivenessPayload, type ProcessLivenessResponse, type SDKOptions, type SdkCreateVerificationRequestResponse, type SignatureComponents, type VerificationIdentifierCredential, type VerificationRequest, type VerificationRequestParams, type VerificationSessionRequestOptions, WebhookSignatureErrorCodes, WebhookSignatureErrorMessages, type WebhookVerifierOptions, ZypheError, addKybCaseDirectors, addKybCaseUbos, addKybDirectors, addKybUbos, bufferToHex, completeDocumentSelectionStep, completeDvStep, completeLivenessStep, constructVerificationSessionUrl, createVerificationSession, decideKybCase, getDvResult, getFlowResult, getKybCase, getKybCaseOfficers, getNextStepDetails, getTinCheck, getTinCheckQuote, getTransaction, hexToBytes, ingestTransaction, listFlowResults, listTinChecks, parseSignatureHeader, removeKybCaseDirector, removeKybCaseUbo, removeKybDirector, removeKybUbo, requestKybCaseOnDemandDocument, requestKybOnDemandDocument, runTinCheck, screenAml, sendKybCaseUboReminder, sendKybUboReminder, timingSafeEqual, updateTransactionStatus };
|
|
12688
|
+
export { API_KEY_HEADER, type ApiKeyType, type BaxeError, type CompleteLivenessStepParams, type CreateVerificationSessionParams, DocumentType, type Environment, EnvironmentConfigs, Environments, type Flow, type FlowStep, type FlowStepType, type GetLivenessChallengeOptions, type GetLivenessChallengeResponse, type GetNextStepDetailsParams, type InitializeZypheFlowParams, type Locale, type ProcessDocumentSelectionOptions, type ProcessDocumentSelectionPayload, type ProcessDocumentSelectionRequestPayload, type ProcessDocumentSelectionResponse, type ProcessDvDocumentOptions, type ProcessDvDocumentPayload, type ProcessDvLivenessOptions, type ProcessDvLivenessParams, type ProcessIdentityDocumentPayload, type ProcessIdentityDocumentResponse, type ProcessLivenessPayload, type ProcessLivenessResponse, type SDKOptions, type SdkCreateVerificationRequestResponse, type SignatureComponents, type VerificationIdentifierCredential, type VerificationRequest, type VerificationRequestParams, type VerificationSessionRequestOptions, WebhookSignatureErrorCodes, WebhookSignatureErrorMessages, type WebhookVerifierOptions, ZypheError, addKybCaseDirectors, addKybCaseUbos, addKybDirectors, addKybUbos, bufferToHex, completeDocumentSelectionStep, completeDvStep, completeLivenessStep, constructVerificationSessionUrl, createVerificationSession, decideKybCase, getDvResult, getFlowResult, getKybCase, getKybCaseOfficers, getKybCaseReport, getNextStepDetails, getTinCheck, getTinCheckQuote, getTransaction, hexToBytes, ingestTransaction, listFlowResults, listTinChecks, parseSignatureHeader, removeKybCaseDirector, removeKybCaseUbo, removeKybDirector, removeKybUbo, requestKybCaseOnDemandDocument, requestKybOnDemandDocument, runTinCheck, screenAml, sendKybCaseUboReminder, sendKybUboReminder, timingSafeEqual, updateTransactionStatus };
|
package/dist/index.js
CHANGED
|
@@ -1545,6 +1545,43 @@ async function getKybCase({ organizationId, caseId, isSandbox, locale }, opts) {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
});
|
|
1547
1547
|
}
|
|
1548
|
+
function attachmentFileName(header) {
|
|
1549
|
+
return header ? /filename="?([^";]+)"?/i.exec(header)?.[1] : void 0;
|
|
1550
|
+
}
|
|
1551
|
+
async function getKybCaseReport({ organizationId, caseId, isSandbox, locale, ifNoneMatch }, opts) {
|
|
1552
|
+
ensureApiKeyType(opts.apiKey, ["SECRET"]);
|
|
1553
|
+
const client = zypheApiClient(opts);
|
|
1554
|
+
const { data, error, response } = await client.GET("/sdk/organizations/{organization_id}/kyb-cases/{case_id}/report", {
|
|
1555
|
+
params: {
|
|
1556
|
+
path: {
|
|
1557
|
+
organization_id: organizationId,
|
|
1558
|
+
case_id: caseId
|
|
1559
|
+
},
|
|
1560
|
+
query: {
|
|
1561
|
+
sandbox: isSandbox,
|
|
1562
|
+
locale
|
|
1563
|
+
},
|
|
1564
|
+
header: ifNoneMatch ? { "If-None-Match": ifNoneMatch } : void 0
|
|
1565
|
+
},
|
|
1566
|
+
headers: {
|
|
1567
|
+
[API_KEY_HEADER]: opts.apiKey,
|
|
1568
|
+
Accept: "application/pdf"
|
|
1569
|
+
},
|
|
1570
|
+
parseAs: "arrayBuffer"
|
|
1571
|
+
});
|
|
1572
|
+
const etag = response.headers.get("etag") ?? void 0;
|
|
1573
|
+
if (response.status === 304) {
|
|
1574
|
+
return { data: void 0, error: void 0, response, notModified: true, etag, fileName: void 0 };
|
|
1575
|
+
}
|
|
1576
|
+
return {
|
|
1577
|
+
data: data ? new Uint8Array(data) : void 0,
|
|
1578
|
+
error,
|
|
1579
|
+
response,
|
|
1580
|
+
notModified: false,
|
|
1581
|
+
etag,
|
|
1582
|
+
fileName: attachmentFileName(response.headers.get("content-disposition"))
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1548
1585
|
async function decideKybCase({ organizationId, caseId, isSandbox, locale, outcome, reason, reasonCode, dueDiligenceLevel, confirmingProposalId }, opts) {
|
|
1549
1586
|
ensureApiKeyType(opts.apiKey, ["SECRET"]);
|
|
1550
1587
|
const client = zypheApiClient(opts);
|
|
@@ -2065,6 +2102,7 @@ export {
|
|
|
2065
2102
|
getFlowResult,
|
|
2066
2103
|
getKybCase,
|
|
2067
2104
|
getKybCaseOfficers,
|
|
2105
|
+
getKybCaseReport,
|
|
2068
2106
|
getNextStepDetails,
|
|
2069
2107
|
getTinCheck,
|
|
2070
2108
|
getTinCheckQuote,
|