@visa-check-r/integrations 0.0.121 → 0.0.123
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 +48 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.esm.js +48 -7
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2253,7 +2253,8 @@ var sopReviewQuery = [
|
|
|
2253
2253
|
"visaProfileId",
|
|
2254
2254
|
"isValidSOP",
|
|
2255
2255
|
"documentType",
|
|
2256
|
-
"visaType"
|
|
2256
|
+
"visaType",
|
|
2257
|
+
"topic"
|
|
2257
2258
|
];
|
|
2258
2259
|
var documentReviewQuery = [
|
|
2259
2260
|
"title",
|
|
@@ -4330,8 +4331,8 @@ var createAIServerService = (client) => {
|
|
|
4330
4331
|
async startDraft(input, option) {
|
|
4331
4332
|
var _a;
|
|
4332
4333
|
const res = await client.request(
|
|
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) {
|
|
4334
|
+
`mutation startDraft($visaProfileId: String, $documentType: String!, $fromUpload: Boolean, $visaProfileChecklistItemId: String, $visaType: String, $topic: String) {
|
|
4335
|
+
startDraft(visaProfileId: $visaProfileId, documentType: $documentType, fromUpload: $fromUpload, visaProfileChecklistItemId: $visaProfileChecklistItemId, visaType: $visaType, topic: $topic) {
|
|
4335
4336
|
aiServerAuth { url accessToken runId }
|
|
4336
4337
|
}
|
|
4337
4338
|
}`,
|
|
@@ -4344,7 +4345,7 @@ var createAIServerService = (client) => {
|
|
|
4344
4345
|
async finishDraft(input, option) {
|
|
4345
4346
|
var _a, _b;
|
|
4346
4347
|
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
|
+
`mutation finishDraft($runId: String!, $result: String!) { finishDraft(runId: $runId, result: $result) { draft { id visaProfileId visaProfileChecklistItemId documentType topic visaType generatedSop reviewedAt createdAt } } }`,
|
|
4348
4349
|
input,
|
|
4349
4350
|
option
|
|
4350
4351
|
);
|
|
@@ -4354,17 +4355,27 @@ var createAIServerService = (client) => {
|
|
|
4354
4355
|
async listMyDrafts(option) {
|
|
4355
4356
|
var _a, _b, _c;
|
|
4356
4357
|
const res = await client.request(
|
|
4357
|
-
`query listMyDrafts { listMyDrafts { drafts { id documentType visaType generatedSop createdAt } } }`,
|
|
4358
|
+
`query listMyDrafts { listMyDrafts { drafts { id documentType topic visaType generatedSop createdAt } } }`,
|
|
4358
4359
|
{},
|
|
4359
4360
|
option
|
|
4360
4361
|
);
|
|
4361
4362
|
return (_c = (_b = (_a = res.data) == null ? void 0 : _a.listMyDrafts) == null ? void 0 : _b.drafts) != null ? _c : [];
|
|
4362
4363
|
},
|
|
4363
|
-
/**
|
|
4364
|
+
/** A visa profile's SOP and LOEs (one LOE per topic), newest first. */
|
|
4365
|
+
async listProfileDrafts(visaProfileId, option) {
|
|
4366
|
+
var _a, _b, _c;
|
|
4367
|
+
const res = await client.request(
|
|
4368
|
+
`query listProfileDrafts($visaProfileId: String!) { listProfileDrafts(visaProfileId: $visaProfileId) { drafts { id visaProfileId documentType topic visaType generatedSop reviewedAt createdAt } } }`,
|
|
4369
|
+
{ visaProfileId },
|
|
4370
|
+
option
|
|
4371
|
+
);
|
|
4372
|
+
return (_c = (_b = (_a = res.data) == null ? void 0 : _a.listProfileDrafts) == null ? void 0 : _b.drafts) != null ? _c : [];
|
|
4373
|
+
},
|
|
4374
|
+
/** Moves a draft onto a visa profile, replacing that profile's draft of the same kind (and, for an LOE, topic). */
|
|
4364
4375
|
async attachDraft(input, option) {
|
|
4365
4376
|
var _a, _b;
|
|
4366
4377
|
const res = await client.request(
|
|
4367
|
-
`mutation attachDraft($draftId: String!, $visaProfileId: String!) { attachDraft(draftId: $draftId, visaProfileId: $visaProfileId) { draft { id visaProfileId documentType } } }`,
|
|
4378
|
+
`mutation attachDraft($draftId: String!, $visaProfileId: String!) { attachDraft(draftId: $draftId, visaProfileId: $visaProfileId) { draft { id visaProfileId documentType topic } } }`,
|
|
4368
4379
|
input,
|
|
4369
4380
|
option
|
|
4370
4381
|
);
|
|
@@ -4410,6 +4421,36 @@ var createAIServerService = (client) => {
|
|
|
4410
4421
|
);
|
|
4411
4422
|
return (_b = (_a = res.data) == null ? void 0 : _a.attachRefusalAnalysis) == null ? void 0 : _b.refusalAnalysis;
|
|
4412
4423
|
},
|
|
4424
|
+
/** Deletes an SOP or LOE draft (its owner's, or one on a profile the caller can edit); returns its id. */
|
|
4425
|
+
async deleteDraft(draftId, option) {
|
|
4426
|
+
var _a, _b;
|
|
4427
|
+
const res = await client.request(
|
|
4428
|
+
`mutation deleteDraft($draftId: String!) { deleteDraft(draftId: $draftId) { id } }`,
|
|
4429
|
+
{ draftId },
|
|
4430
|
+
option
|
|
4431
|
+
);
|
|
4432
|
+
return (_b = (_a = res.data) == null ? void 0 : _a.deleteDraft) == null ? void 0 : _b.id;
|
|
4433
|
+
},
|
|
4434
|
+
/** Deletes a refusal analysis (its owner's, or one on a profile the caller can edit); returns its id. */
|
|
4435
|
+
async deleteRefusalAnalysis(id, option) {
|
|
4436
|
+
var _a, _b;
|
|
4437
|
+
const res = await client.request(
|
|
4438
|
+
`mutation deleteRefusalAnalysis($id: String!) { deleteRefusalAnalysis(id: $id) { id } }`,
|
|
4439
|
+
{ id },
|
|
4440
|
+
option
|
|
4441
|
+
);
|
|
4442
|
+
return (_b = (_a = res.data) == null ? void 0 : _a.deleteRefusalAnalysis) == null ? void 0 : _b.id;
|
|
4443
|
+
},
|
|
4444
|
+
/** Deletes a readiness check run without a visa profile, with its documents; returns its id. */
|
|
4445
|
+
async deleteReadinessCheck(readinessProfileId, option) {
|
|
4446
|
+
var _a, _b;
|
|
4447
|
+
const res = await client.request(
|
|
4448
|
+
`mutation deleteReadinessCheck($readinessProfileId: String!) { deleteReadinessCheck(readinessProfileId: $readinessProfileId) { id } }`,
|
|
4449
|
+
{ readinessProfileId },
|
|
4450
|
+
option
|
|
4451
|
+
);
|
|
4452
|
+
return (_b = (_a = res.data) == null ? void 0 : _a.deleteReadinessCheck) == null ? void 0 : _b.id;
|
|
4453
|
+
},
|
|
4413
4454
|
/** Stores a file for the AI to read when there's no visa profile; returns its URL. */
|
|
4414
4455
|
async uploadDraftFile(file) {
|
|
4415
4456
|
const formData = new FormData();
|