@visa-check-r/integrations 0.0.124 → 0.0.126
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.cjs.js +42 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +30 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.esm.js +42 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4310,6 +4310,7 @@ var aiServerSchema = {
|
|
|
4310
4310
|
};
|
|
4311
4311
|
|
|
4312
4312
|
// src/services/ai-integration/ai-server.service.ts
|
|
4313
|
+
var addedDocumentFields = "id readinessProfileId checklistItemId title addedAt documentId fileName fileUrl";
|
|
4313
4314
|
var refusalAnalysisFields = "id ownerId visaProfileId fileName fileUrl summary createdAt refusalFindings { severity title explanation recommendation action }";
|
|
4314
4315
|
var createAIServerService = (client) => {
|
|
4315
4316
|
return {
|
|
@@ -4451,6 +4452,36 @@ var createAIServerService = (client) => {
|
|
|
4451
4452
|
);
|
|
4452
4453
|
return (_b = (_a = res.data) == null ? void 0 : _a.deleteReadinessCheck) == null ? void 0 : _b.id;
|
|
4453
4454
|
},
|
|
4455
|
+
/** The documents added by hand to a readiness check's list, each with its latest upload. */
|
|
4456
|
+
async listAddedDocuments(readinessProfileId, option) {
|
|
4457
|
+
var _a, _b, _c;
|
|
4458
|
+
const res = await client.request(
|
|
4459
|
+
`query listAddedDocuments($readinessProfileId: String!) { listAddedDocuments(readinessProfileId: $readinessProfileId) { addedDocuments { ${addedDocumentFields} } } }`,
|
|
4460
|
+
{ readinessProfileId },
|
|
4461
|
+
option
|
|
4462
|
+
);
|
|
4463
|
+
return (_c = (_b = (_a = res.data) == null ? void 0 : _a.listAddedDocuments) == null ? void 0 : _b.addedDocuments) != null ? _c : [];
|
|
4464
|
+
},
|
|
4465
|
+
/** Puts a document on a readiness check's list by name (adding the same name again keeps the first). */
|
|
4466
|
+
async addReadinessDocument(input, option) {
|
|
4467
|
+
var _a, _b;
|
|
4468
|
+
const res = await client.request(
|
|
4469
|
+
`mutation addReadinessDocument($readinessProfileId: String!, $title: String!) { addReadinessDocument(readinessProfileId: $readinessProfileId, title: $title) { addedDocument { ${addedDocumentFields} } } }`,
|
|
4470
|
+
input,
|
|
4471
|
+
option
|
|
4472
|
+
);
|
|
4473
|
+
return (_b = (_a = res.data) == null ? void 0 : _a.addReadinessDocument) == null ? void 0 : _b.addedDocument;
|
|
4474
|
+
},
|
|
4475
|
+
/** Takes an added document off the list, with its uploads; returns its id. */
|
|
4476
|
+
async removeAddedDocument(id, option) {
|
|
4477
|
+
var _a, _b;
|
|
4478
|
+
const res = await client.request(
|
|
4479
|
+
`mutation removeAddedDocument($id: String!) { removeAddedDocument(id: $id) { id filesRemoved } }`,
|
|
4480
|
+
{ id },
|
|
4481
|
+
option
|
|
4482
|
+
);
|
|
4483
|
+
return (_b = (_a = res.data) == null ? void 0 : _a.removeAddedDocument) == null ? void 0 : _b.id;
|
|
4484
|
+
},
|
|
4454
4485
|
/** Stores a file for the AI to read when there's no visa profile; returns its URL. */
|
|
4455
4486
|
async uploadDraftFile(file) {
|
|
4456
4487
|
const formData = new FormData();
|
|
@@ -4552,6 +4583,17 @@ var createPartnerLinkService = (client) => ({
|
|
|
4552
4583
|
option
|
|
4553
4584
|
);
|
|
4554
4585
|
return (_a = res.data) == null ? void 0 : _a.partnerDashboard;
|
|
4586
|
+
},
|
|
4587
|
+
/** The check status of each of the partner's client profiles asked for (at most 100); others are left out. */
|
|
4588
|
+
async partnerProfileChecks(visaProfileIds, option) {
|
|
4589
|
+
var _a, _b, _c;
|
|
4590
|
+
if (!visaProfileIds.length) return [];
|
|
4591
|
+
const res = await client.request(
|
|
4592
|
+
`query partnerProfileChecks($visaProfileIds: [String]!) { partnerProfileChecks(visaProfileIds: $visaProfileIds) { profileChecks { visaProfileId status } } }`,
|
|
4593
|
+
{ visaProfileIds },
|
|
4594
|
+
option
|
|
4595
|
+
);
|
|
4596
|
+
return (_c = (_b = (_a = res.data) == null ? void 0 : _a.partnerProfileChecks) == null ? void 0 : _b.profileChecks) != null ? _c : [];
|
|
4555
4597
|
}
|
|
4556
4598
|
});
|
|
4557
4599
|
|