@visa-check-r/integrations 0.0.119 → 0.0.120

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
@@ -4284,7 +4284,8 @@ var createCouponService = (client) => ({
4284
4284
  var aiServerAuthQuery = [
4285
4285
  "visaProfileId",
4286
4286
  "accessToken",
4287
- "url"
4287
+ "url",
4288
+ "runId"
4288
4289
  ];
4289
4290
 
4290
4291
  // src/services/ai-integration/types/ai-server-auth.type.ts
@@ -4328,9 +4329,9 @@ var createAIServerService = (client) => {
4328
4329
  async startDraft(input, option) {
4329
4330
  var _a;
4330
4331
  const res = await client.request(
4331
- `mutation startDraft($visaProfileId: String, $documentType: String!, $fromUpload: Boolean) {
4332
- startDraft(visaProfileId: $visaProfileId, documentType: $documentType, fromUpload: $fromUpload) {
4333
- aiServerAuth { url accessToken }
4332
+ `mutation startDraft($visaProfileId: String, $documentType: String!, $fromUpload: Boolean, $visaProfileChecklistItemId: String, $visaType: String) {
4333
+ startDraft(visaProfileId: $visaProfileId, documentType: $documentType, fromUpload: $fromUpload, visaProfileChecklistItemId: $visaProfileChecklistItemId, visaType: $visaType) {
4334
+ aiServerAuth { url accessToken runId }
4334
4335
  }
4335
4336
  }`,
4336
4337
  input,
@@ -4338,6 +4339,16 @@ var createAIServerService = (client) => {
4338
4339
  );
4339
4340
  return (_a = res.data) == null ? void 0 : _a.startDraft;
4340
4341
  },
4342
+ /** Saves a finished draft once per run; returns the copy the AI service saved if it got there first. */
4343
+ async finishDraft(input, option) {
4344
+ var _a, _b;
4345
+ const res = await client.request(
4346
+ `mutation finishDraft($runId: String!, $result: String!) { finishDraft(runId: $runId, result: $result) { draft { id visaProfileId visaProfileChecklistItemId documentType visaType generatedSop reviewedAt createdAt } } }`,
4347
+ input,
4348
+ option
4349
+ );
4350
+ return (_b = (_a = res.data) == null ? void 0 : _a.finishDraft) == null ? void 0 : _b.draft;
4351
+ },
4341
4352
  /** The caller's SOP and LOE drafts that aren't attached to a visa profile. */
4342
4353
  async listMyDrafts(option) {
4343
4354
  var _a, _b, _c;
@@ -4362,7 +4373,7 @@ var createAIServerService = (client) => {
4362
4373
  async saveRefusalAnalysis(input, option) {
4363
4374
  var _a, _b;
4364
4375
  const res = await client.request(
4365
- `mutation saveRefusalAnalysis($refusalAnalysis: RefusalAnalysisInput!) { saveRefusalAnalysis(refusalAnalysis: $refusalAnalysis) { refusalAnalysis { ${refusalAnalysisFields} } } }`,
4376
+ `mutation saveRefusalAnalysis($refusalAnalysis: RefusalAnalysisInput!, $runId: String) { saveRefusalAnalysis(refusalAnalysis: $refusalAnalysis, runId: $runId) { refusalAnalysis { ${refusalAnalysisFields} } } }`,
4366
4377
  input,
4367
4378
  option
4368
4379
  );