@zyphe-sdk/core 0.8.0 → 0.9.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 +612 -262
- package/dist/index.js +58 -3
- package/dist/index.js.map +1 -1
- package/dist/openapi.d.ts +485 -259
- package/dist/openapi.json +991 -428
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -222,6 +222,11 @@ async function completeDocumentSelectionStep({ verificationSession, payload }, o
|
|
|
222
222
|
return processDocumentSelectionResponse.data;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
// src/utils/attachment.ts
|
|
226
|
+
function attachmentFileName(header) {
|
|
227
|
+
return header ? /filename="?([^";]+)"?/i.exec(header)?.[1] : void 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
225
230
|
// src/gen/dv_result.ts
|
|
226
231
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
227
232
|
function imageProvenanceFromJSON(object) {
|
|
@@ -1338,6 +1343,25 @@ async function listFlowResults({ organizationId, flowSlug, isSandbox, pagination
|
|
|
1338
1343
|
}
|
|
1339
1344
|
});
|
|
1340
1345
|
}
|
|
1346
|
+
async function searchFlowResults({ organizationId, isSandbox, search, locale }, opts) {
|
|
1347
|
+
ensureApiKeyType(opts.apiKey, ["SECRET"]);
|
|
1348
|
+
const client = zypheApiClient(opts);
|
|
1349
|
+
return client.POST("/sdk/organizations/{organization_id}/flow-results/search", {
|
|
1350
|
+
params: {
|
|
1351
|
+
path: {
|
|
1352
|
+
organization_id: organizationId
|
|
1353
|
+
},
|
|
1354
|
+
query: {
|
|
1355
|
+
sandbox: isSandbox,
|
|
1356
|
+
locale
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
body: search,
|
|
1360
|
+
headers: {
|
|
1361
|
+
[API_KEY_HEADER]: opts.apiKey
|
|
1362
|
+
}
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1341
1365
|
async function getFlowResult({ organizationId, flowResultId, isSandbox }, opts) {
|
|
1342
1366
|
ensureApiKeyType(opts.apiKey, ["SECRET"]);
|
|
1343
1367
|
const client = zypheApiClient(opts);
|
|
@@ -1398,6 +1422,38 @@ async function getDvResult({ organizationId, flowResultId, dvResultId, isSandbox
|
|
|
1398
1422
|
data: data ? decodeLengthPrefixedMessages(new Uint8Array(data)) : void 0
|
|
1399
1423
|
};
|
|
1400
1424
|
}
|
|
1425
|
+
async function getDvResultReport({ organizationId, flowResultId, flowSlug, dvResultId, isSandbox, locale }, opts) {
|
|
1426
|
+
ensureApiKeyType(opts.apiKey, ["SECRET"]);
|
|
1427
|
+
const client = zypheApiClient(opts);
|
|
1428
|
+
const { data, error, response } = await client.GET(
|
|
1429
|
+
"/sdk/organizations/{organization_id}/flow-results/{flow_result_id}/flow/{flow_slug}/dv/{dv_result_id}/report",
|
|
1430
|
+
{
|
|
1431
|
+
params: {
|
|
1432
|
+
path: {
|
|
1433
|
+
organization_id: organizationId,
|
|
1434
|
+
flow_result_id: flowResultId,
|
|
1435
|
+
flow_slug: flowSlug,
|
|
1436
|
+
dv_result_id: dvResultId
|
|
1437
|
+
},
|
|
1438
|
+
query: {
|
|
1439
|
+
sandbox: isSandbox,
|
|
1440
|
+
locale
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
headers: {
|
|
1444
|
+
[API_KEY_HEADER]: opts.apiKey,
|
|
1445
|
+
Accept: "application/pdf"
|
|
1446
|
+
},
|
|
1447
|
+
parseAs: "arrayBuffer"
|
|
1448
|
+
}
|
|
1449
|
+
);
|
|
1450
|
+
return {
|
|
1451
|
+
data: data ? new Uint8Array(data) : void 0,
|
|
1452
|
+
error,
|
|
1453
|
+
response,
|
|
1454
|
+
fileName: attachmentFileName(response.headers.get("content-disposition"))
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1401
1457
|
|
|
1402
1458
|
// src/kyb.ts
|
|
1403
1459
|
async function addKybUbos({ organizationId, kybResultId, isSandbox, persons, locale }, opts) {
|
|
@@ -1545,9 +1601,6 @@ async function getKybCase({ organizationId, caseId, isSandbox, locale }, opts) {
|
|
|
1545
1601
|
}
|
|
1546
1602
|
});
|
|
1547
1603
|
}
|
|
1548
|
-
function attachmentFileName(header) {
|
|
1549
|
-
return header ? /filename="?([^";]+)"?/i.exec(header)?.[1] : void 0;
|
|
1550
|
-
}
|
|
1551
1604
|
async function getKybCaseReport({ organizationId, caseId, isSandbox, locale, ifNoneMatch }, opts) {
|
|
1552
1605
|
ensureApiKeyType(opts.apiKey, ["SECRET"]);
|
|
1553
1606
|
const client = zypheApiClient(opts);
|
|
@@ -2099,6 +2152,7 @@ export {
|
|
|
2099
2152
|
createVerificationSession,
|
|
2100
2153
|
decideKybCase,
|
|
2101
2154
|
getDvResult,
|
|
2155
|
+
getDvResultReport,
|
|
2102
2156
|
getFlowResult,
|
|
2103
2157
|
getKybCase,
|
|
2104
2158
|
getKybCaseOfficers,
|
|
@@ -2120,6 +2174,7 @@ export {
|
|
|
2120
2174
|
requestKybOnDemandDocument,
|
|
2121
2175
|
runTinCheck,
|
|
2122
2176
|
screenAml,
|
|
2177
|
+
searchFlowResults,
|
|
2123
2178
|
sendKybCaseUboReminder,
|
|
2124
2179
|
sendKybUboReminder,
|
|
2125
2180
|
timingSafeEqual,
|