@visa-check-r/integrations 0.0.115 → 0.0.117

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
@@ -1679,6 +1679,7 @@ var visaProfileChecklistItemQuery = [
1679
1679
  "checklistItemId",
1680
1680
  "value",
1681
1681
  "visaProfileChecklistItemStatus",
1682
+ "rejectionReason",
1682
1683
  "createdAt",
1683
1684
  "checklistItem",
1684
1685
  "fileInfo",
@@ -4300,6 +4301,7 @@ var aiServerSchema = {
4300
4301
  };
4301
4302
 
4302
4303
  // src/services/ai-integration/ai-server.service.ts
4304
+ var refusalAnalysisFields = "id ownerId visaProfileId fileName fileUrl summary createdAt refusalFindings { severity title explanation recommendation action }";
4303
4305
  var createAIServerService = (client) => {
4304
4306
  return {
4305
4307
  async getAIServerAuth(input, fetchFields, option) {
@@ -4350,6 +4352,46 @@ var createAIServerService = (client) => {
4350
4352
  );
4351
4353
  return (_b = (_a = res.data) == null ? void 0 : _a.attachDraft) == null ? void 0 : _b.draft;
4352
4354
  },
4355
+ /** Keeps a finished refusal analysis: on a visa profile, or as the caller's own when none is given. */
4356
+ async saveRefusalAnalysis(input, option) {
4357
+ var _a, _b;
4358
+ const res = await client.request(
4359
+ `mutation saveRefusalAnalysis($refusalAnalysis: RefusalAnalysisInput!) { saveRefusalAnalysis(refusalAnalysis: $refusalAnalysis) { refusalAnalysis { ${refusalAnalysisFields} } } }`,
4360
+ input,
4361
+ option
4362
+ );
4363
+ return (_b = (_a = res.data) == null ? void 0 : _a.saveRefusalAnalysis) == null ? void 0 : _b.refusalAnalysis;
4364
+ },
4365
+ /** A visa profile's refusal analyses, or with no profile, the caller's own unattached ones. Newest first. */
4366
+ async listRefusalAnalyses(input = {}, option) {
4367
+ var _a, _b, _c;
4368
+ const res = await client.request(
4369
+ `query listRefusalAnalyses($visaProfileId: String) { listRefusalAnalyses(visaProfileId: $visaProfileId) { refusalAnalyses { ${refusalAnalysisFields} } } }`,
4370
+ input,
4371
+ option
4372
+ );
4373
+ return (_c = (_b = (_a = res.data) == null ? void 0 : _a.listRefusalAnalyses) == null ? void 0 : _b.refusalAnalyses) != null ? _c : [];
4374
+ },
4375
+ /** A saved refusal analysis, to read it again. */
4376
+ async getRefusalAnalysis(input, option) {
4377
+ var _a, _b;
4378
+ const res = await client.request(
4379
+ `query getRefusalAnalysis($id: String!) { getRefusalAnalysis(id: $id) { refusalAnalysis { ${refusalAnalysisFields} } } }`,
4380
+ input,
4381
+ option
4382
+ );
4383
+ return (_b = (_a = res.data) == null ? void 0 : _a.getRefusalAnalysis) == null ? void 0 : _b.refusalAnalysis;
4384
+ },
4385
+ /** Moves the caller's own refusal analysis onto a visa profile. */
4386
+ async attachRefusalAnalysis(input, option) {
4387
+ var _a, _b;
4388
+ const res = await client.request(
4389
+ `mutation attachRefusalAnalysis($id: String!, $visaProfileId: String!) { attachRefusalAnalysis(id: $id, visaProfileId: $visaProfileId) { refusalAnalysis { ${refusalAnalysisFields} } } }`,
4390
+ input,
4391
+ option
4392
+ );
4393
+ return (_b = (_a = res.data) == null ? void 0 : _a.attachRefusalAnalysis) == null ? void 0 : _b.refusalAnalysis;
4394
+ },
4353
4395
  /** Stores a file for the AI to read when there's no visa profile; returns its URL. */
4354
4396
  async uploadDraftFile(file) {
4355
4397
  const formData = new FormData();