@visa-check-r/integrations 0.0.125 → 0.0.127

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 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();
@@ -4563,6 +4594,16 @@ var createPartnerLinkService = (client) => ({
4563
4594
  option
4564
4595
  );
4565
4596
  return (_c = (_b = (_a = res.data) == null ? void 0 : _a.partnerProfileChecks) == null ? void 0 : _b.profileChecks) != null ? _c : [];
4597
+ },
4598
+ /** The signed-in user's own visa profiles counted by check status, and how many are ready to submit. */
4599
+ async myProfileSummary(option) {
4600
+ var _a, _b, _c;
4601
+ const res = await client.request(
4602
+ `query { myProfileSummary { profileSummary { total notStarted draft completed ready } } }`,
4603
+ {},
4604
+ option
4605
+ );
4606
+ return (_c = (_b = (_a = res.data) == null ? void 0 : _a.myProfileSummary) == null ? void 0 : _b.profileSummary) != null ? _c : void 0;
4566
4607
  }
4567
4608
  });
4568
4609