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