@visa-check-r/integrations 0.0.120 → 0.0.122

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.d.mts CHANGED
@@ -211,8 +211,10 @@ interface SOPReview {
211
211
  reviewedAt: string;
212
212
  createdAt: string;
213
213
  isValidSOP: BooleanLiteral;
214
- /** Which draft this is; a profile has one of each. */
214
+ /** Which draft this is; a profile has one SOP and one LOE per topic. */
215
215
  documentType?: "sop" | "loe";
216
+ /** LOE only: the issue this letter explains ("Prior refusal"); empty for an SOP. */
217
+ topic?: string;
216
218
  /** Whose draft this is while it isn't attached to a visa profile. */
217
219
  ownerId?: string;
218
220
  visaType?: VisaType;
@@ -499,6 +501,8 @@ interface Question {
499
501
  helperText: string;
500
502
  answerType: QuestionAnswerType;
501
503
  options: string[];
504
+ /** Help for each option, in the same order as `options` ("" = none); shown as a "?" next to the option. Send it with `options`. */
505
+ optionHelp?: string[];
502
506
  isRequired: BooleanLiteral;
503
507
  parentId: string;
504
508
  parentAnswer: string;
@@ -2743,6 +2747,8 @@ interface StartDraftRequest {
2743
2747
  visaProfileChecklistItemId?: string;
2744
2748
  /** The visa type the draft is for (kept on drafts with no profile). */
2745
2749
  visaType?: string;
2750
+ /** LOE only: the issue this letter explains. Each topic is its own letter. */
2751
+ topic?: string;
2746
2752
  }
2747
2753
  interface FinishDraftRequest {
2748
2754
  /** From startDraft's aiServerAuth.runId. */
@@ -2799,7 +2805,9 @@ declare const createAIServerService: (client: GraphQLClient) => {
2799
2805
  finishDraft(input: FinishDraftRequest, option?: RequestOption): Promise<SOPReview | undefined>;
2800
2806
  /** The caller's SOP and LOE drafts that aren't attached to a visa profile. */
2801
2807
  listMyDrafts(option?: RequestOption): Promise<SOPReview[]>;
2802
- /** Moves a draft onto a visa profile, replacing that profile's draft of the same kind. */
2808
+ /** A visa profile's SOP and LOEs (one LOE per topic), newest first. */
2809
+ listProfileDrafts(visaProfileId: string, option?: RequestOption): Promise<SOPReview[]>;
2810
+ /** Moves a draft onto a visa profile, replacing that profile's draft of the same kind (and, for an LOE, topic). */
2803
2811
  attachDraft(input: {
2804
2812
  draftId: string;
2805
2813
  visaProfileId: string;
package/dist/index.d.ts CHANGED
@@ -211,8 +211,10 @@ interface SOPReview {
211
211
  reviewedAt: string;
212
212
  createdAt: string;
213
213
  isValidSOP: BooleanLiteral;
214
- /** Which draft this is; a profile has one of each. */
214
+ /** Which draft this is; a profile has one SOP and one LOE per topic. */
215
215
  documentType?: "sop" | "loe";
216
+ /** LOE only: the issue this letter explains ("Prior refusal"); empty for an SOP. */
217
+ topic?: string;
216
218
  /** Whose draft this is while it isn't attached to a visa profile. */
217
219
  ownerId?: string;
218
220
  visaType?: VisaType;
@@ -499,6 +501,8 @@ interface Question {
499
501
  helperText: string;
500
502
  answerType: QuestionAnswerType;
501
503
  options: string[];
504
+ /** Help for each option, in the same order as `options` ("" = none); shown as a "?" next to the option. Send it with `options`. */
505
+ optionHelp?: string[];
502
506
  isRequired: BooleanLiteral;
503
507
  parentId: string;
504
508
  parentAnswer: string;
@@ -2743,6 +2747,8 @@ interface StartDraftRequest {
2743
2747
  visaProfileChecklistItemId?: string;
2744
2748
  /** The visa type the draft is for (kept on drafts with no profile). */
2745
2749
  visaType?: string;
2750
+ /** LOE only: the issue this letter explains. Each topic is its own letter. */
2751
+ topic?: string;
2746
2752
  }
2747
2753
  interface FinishDraftRequest {
2748
2754
  /** From startDraft's aiServerAuth.runId. */
@@ -2799,7 +2805,9 @@ declare const createAIServerService: (client: GraphQLClient) => {
2799
2805
  finishDraft(input: FinishDraftRequest, option?: RequestOption): Promise<SOPReview | undefined>;
2800
2806
  /** The caller's SOP and LOE drafts that aren't attached to a visa profile. */
2801
2807
  listMyDrafts(option?: RequestOption): Promise<SOPReview[]>;
2802
- /** Moves a draft onto a visa profile, replacing that profile's draft of the same kind. */
2808
+ /** A visa profile's SOP and LOEs (one LOE per topic), newest first. */
2809
+ listProfileDrafts(visaProfileId: string, option?: RequestOption): Promise<SOPReview[]>;
2810
+ /** Moves a draft onto a visa profile, replacing that profile's draft of the same kind (and, for an LOE, topic). */
2803
2811
  attachDraft(input: {
2804
2812
  draftId: string;
2805
2813
  visaProfileId: string;
package/dist/index.esm.js CHANGED
@@ -1696,6 +1696,7 @@ var questionQuery = [
1696
1696
  "helperText",
1697
1697
  "answerType",
1698
1698
  "options",
1699
+ "optionHelp",
1699
1700
  "isRequired",
1700
1701
  "parentId",
1701
1702
  "parentAnswer",
@@ -2250,7 +2251,8 @@ var sopReviewQuery = [
2250
2251
  "visaProfileId",
2251
2252
  "isValidSOP",
2252
2253
  "documentType",
2253
- "visaType"
2254
+ "visaType",
2255
+ "topic"
2254
2256
  ];
2255
2257
  var documentReviewQuery = [
2256
2258
  "title",
@@ -4327,8 +4329,8 @@ var createAIServerService = (client) => {
4327
4329
  async startDraft(input, option) {
4328
4330
  var _a;
4329
4331
  const res = await client.request(
4330
- `mutation startDraft($visaProfileId: String, $documentType: String!, $fromUpload: Boolean, $visaProfileChecklistItemId: String, $visaType: String) {
4331
- startDraft(visaProfileId: $visaProfileId, documentType: $documentType, fromUpload: $fromUpload, visaProfileChecklistItemId: $visaProfileChecklistItemId, visaType: $visaType) {
4332
+ `mutation startDraft($visaProfileId: String, $documentType: String!, $fromUpload: Boolean, $visaProfileChecklistItemId: String, $visaType: String, $topic: String) {
4333
+ startDraft(visaProfileId: $visaProfileId, documentType: $documentType, fromUpload: $fromUpload, visaProfileChecklistItemId: $visaProfileChecklistItemId, visaType: $visaType, topic: $topic) {
4332
4334
  aiServerAuth { url accessToken runId }
4333
4335
  }
4334
4336
  }`,
@@ -4341,7 +4343,7 @@ var createAIServerService = (client) => {
4341
4343
  async finishDraft(input, option) {
4342
4344
  var _a, _b;
4343
4345
  const res = await client.request(
4344
- `mutation finishDraft($runId: String!, $result: String!) { finishDraft(runId: $runId, result: $result) { draft { id visaProfileId visaProfileChecklistItemId documentType visaType generatedSop reviewedAt createdAt } } }`,
4346
+ `mutation finishDraft($runId: String!, $result: String!) { finishDraft(runId: $runId, result: $result) { draft { id visaProfileId visaProfileChecklistItemId documentType topic visaType generatedSop reviewedAt createdAt } } }`,
4345
4347
  input,
4346
4348
  option
4347
4349
  );
@@ -4351,17 +4353,27 @@ var createAIServerService = (client) => {
4351
4353
  async listMyDrafts(option) {
4352
4354
  var _a, _b, _c;
4353
4355
  const res = await client.request(
4354
- `query listMyDrafts { listMyDrafts { drafts { id documentType visaType generatedSop createdAt } } }`,
4356
+ `query listMyDrafts { listMyDrafts { drafts { id documentType topic visaType generatedSop createdAt } } }`,
4355
4357
  {},
4356
4358
  option
4357
4359
  );
4358
4360
  return (_c = (_b = (_a = res.data) == null ? void 0 : _a.listMyDrafts) == null ? void 0 : _b.drafts) != null ? _c : [];
4359
4361
  },
4360
- /** Moves a draft onto a visa profile, replacing that profile's draft of the same kind. */
4362
+ /** A visa profile's SOP and LOEs (one LOE per topic), newest first. */
4363
+ async listProfileDrafts(visaProfileId, option) {
4364
+ var _a, _b, _c;
4365
+ const res = await client.request(
4366
+ `query listProfileDrafts($visaProfileId: String!) { listProfileDrafts(visaProfileId: $visaProfileId) { drafts { id visaProfileId documentType topic visaType generatedSop reviewedAt createdAt } } }`,
4367
+ { visaProfileId },
4368
+ option
4369
+ );
4370
+ return (_c = (_b = (_a = res.data) == null ? void 0 : _a.listProfileDrafts) == null ? void 0 : _b.drafts) != null ? _c : [];
4371
+ },
4372
+ /** Moves a draft onto a visa profile, replacing that profile's draft of the same kind (and, for an LOE, topic). */
4361
4373
  async attachDraft(input, option) {
4362
4374
  var _a, _b;
4363
4375
  const res = await client.request(
4364
- `mutation attachDraft($draftId: String!, $visaProfileId: String!) { attachDraft(draftId: $draftId, visaProfileId: $visaProfileId) { draft { id visaProfileId documentType } } }`,
4376
+ `mutation attachDraft($draftId: String!, $visaProfileId: String!) { attachDraft(draftId: $draftId, visaProfileId: $visaProfileId) { draft { id visaProfileId documentType topic } } }`,
4365
4377
  input,
4366
4378
  option
4367
4379
  );