@visa-check-r/integrations 0.0.116 → 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
@@ -4301,6 +4301,7 @@ var aiServerSchema = {
4301
4301
  };
4302
4302
 
4303
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 }";
4304
4305
  var createAIServerService = (client) => {
4305
4306
  return {
4306
4307
  async getAIServerAuth(input, fetchFields, option) {
@@ -4351,6 +4352,46 @@ var createAIServerService = (client) => {
4351
4352
  );
4352
4353
  return (_b = (_a = res.data) == null ? void 0 : _a.attachDraft) == null ? void 0 : _b.draft;
4353
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
+ },
4354
4395
  /** Stores a file for the AI to read when there's no visa profile; returns its URL. */
4355
4396
  async uploadDraftFile(file) {
4356
4397
  const formData = new FormData();