@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.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;
@@ -2745,6 +2747,8 @@ interface StartDraftRequest {
2745
2747
  visaProfileChecklistItemId?: string;
2746
2748
  /** The visa type the draft is for (kept on drafts with no profile). */
2747
2749
  visaType?: string;
2750
+ /** LOE only: the issue this letter explains. Each topic is its own letter. */
2751
+ topic?: string;
2748
2752
  }
2749
2753
  interface FinishDraftRequest {
2750
2754
  /** From startDraft's aiServerAuth.runId. */
@@ -2801,7 +2805,9 @@ declare const createAIServerService: (client: GraphQLClient) => {
2801
2805
  finishDraft(input: FinishDraftRequest, option?: RequestOption): Promise<SOPReview | undefined>;
2802
2806
  /** The caller's SOP and LOE drafts that aren't attached to a visa profile. */
2803
2807
  listMyDrafts(option?: RequestOption): Promise<SOPReview[]>;
2804
- /** 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). */
2805
2811
  attachDraft(input: {
2806
2812
  draftId: string;
2807
2813
  visaProfileId: string;
@@ -2821,6 +2827,12 @@ declare const createAIServerService: (client: GraphQLClient) => {
2821
2827
  id: string;
2822
2828
  visaProfileId: string;
2823
2829
  }, option?: RequestOption): Promise<RefusalAnalysis | undefined>;
2830
+ /** Deletes an SOP or LOE draft (its owner's, or one on a profile the caller can edit); returns its id. */
2831
+ deleteDraft(draftId: string, option?: RequestOption): Promise<string | undefined>;
2832
+ /** Deletes a refusal analysis (its owner's, or one on a profile the caller can edit); returns its id. */
2833
+ deleteRefusalAnalysis(id: string, option?: RequestOption): Promise<string | undefined>;
2834
+ /** Deletes a readiness check run without a visa profile, with its documents; returns its id. */
2835
+ deleteReadinessCheck(readinessProfileId: string, option?: RequestOption): Promise<string | undefined>;
2824
2836
  /** Stores a file for the AI to read when there's no visa profile; returns its URL. */
2825
2837
  uploadDraftFile(file: File | Blob): Promise<string | undefined>;
2826
2838
  };
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;
@@ -2745,6 +2747,8 @@ interface StartDraftRequest {
2745
2747
  visaProfileChecklistItemId?: string;
2746
2748
  /** The visa type the draft is for (kept on drafts with no profile). */
2747
2749
  visaType?: string;
2750
+ /** LOE only: the issue this letter explains. Each topic is its own letter. */
2751
+ topic?: string;
2748
2752
  }
2749
2753
  interface FinishDraftRequest {
2750
2754
  /** From startDraft's aiServerAuth.runId. */
@@ -2801,7 +2805,9 @@ declare const createAIServerService: (client: GraphQLClient) => {
2801
2805
  finishDraft(input: FinishDraftRequest, option?: RequestOption): Promise<SOPReview | undefined>;
2802
2806
  /** The caller's SOP and LOE drafts that aren't attached to a visa profile. */
2803
2807
  listMyDrafts(option?: RequestOption): Promise<SOPReview[]>;
2804
- /** 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). */
2805
2811
  attachDraft(input: {
2806
2812
  draftId: string;
2807
2813
  visaProfileId: string;
@@ -2821,6 +2827,12 @@ declare const createAIServerService: (client: GraphQLClient) => {
2821
2827
  id: string;
2822
2828
  visaProfileId: string;
2823
2829
  }, option?: RequestOption): Promise<RefusalAnalysis | undefined>;
2830
+ /** Deletes an SOP or LOE draft (its owner's, or one on a profile the caller can edit); returns its id. */
2831
+ deleteDraft(draftId: string, option?: RequestOption): Promise<string | undefined>;
2832
+ /** Deletes a refusal analysis (its owner's, or one on a profile the caller can edit); returns its id. */
2833
+ deleteRefusalAnalysis(id: string, option?: RequestOption): Promise<string | undefined>;
2834
+ /** Deletes a readiness check run without a visa profile, with its documents; returns its id. */
2835
+ deleteReadinessCheck(readinessProfileId: string, option?: RequestOption): Promise<string | undefined>;
2824
2836
  /** Stores a file for the AI to read when there's no visa profile; returns its URL. */
2825
2837
  uploadDraftFile(file: File | Blob): Promise<string | undefined>;
2826
2838
  };
package/dist/index.esm.js CHANGED
@@ -2251,7 +2251,8 @@ var sopReviewQuery = [
2251
2251
  "visaProfileId",
2252
2252
  "isValidSOP",
2253
2253
  "documentType",
2254
- "visaType"
2254
+ "visaType",
2255
+ "topic"
2255
2256
  ];
2256
2257
  var documentReviewQuery = [
2257
2258
  "title",
@@ -4328,8 +4329,8 @@ 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, $visaProfileChecklistItemId: String, $visaType: String) {
4332
- 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) {
4333
4334
  aiServerAuth { url accessToken runId }
4334
4335
  }
4335
4336
  }`,
@@ -4342,7 +4343,7 @@ var createAIServerService = (client) => {
4342
4343
  async finishDraft(input, option) {
4343
4344
  var _a, _b;
4344
4345
  const res = await client.request(
4345
- `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 } } }`,
4346
4347
  input,
4347
4348
  option
4348
4349
  );
@@ -4352,17 +4353,27 @@ var createAIServerService = (client) => {
4352
4353
  async listMyDrafts(option) {
4353
4354
  var _a, _b, _c;
4354
4355
  const res = await client.request(
4355
- `query listMyDrafts { listMyDrafts { drafts { id documentType visaType generatedSop createdAt } } }`,
4356
+ `query listMyDrafts { listMyDrafts { drafts { id documentType topic visaType generatedSop createdAt } } }`,
4356
4357
  {},
4357
4358
  option
4358
4359
  );
4359
4360
  return (_c = (_b = (_a = res.data) == null ? void 0 : _a.listMyDrafts) == null ? void 0 : _b.drafts) != null ? _c : [];
4360
4361
  },
4361
- /** 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). */
4362
4373
  async attachDraft(input, option) {
4363
4374
  var _a, _b;
4364
4375
  const res = await client.request(
4365
- `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 } } }`,
4366
4377
  input,
4367
4378
  option
4368
4379
  );
@@ -4408,6 +4419,36 @@ var createAIServerService = (client) => {
4408
4419
  );
4409
4420
  return (_b = (_a = res.data) == null ? void 0 : _a.attachRefusalAnalysis) == null ? void 0 : _b.refusalAnalysis;
4410
4421
  },
4422
+ /** Deletes an SOP or LOE draft (its owner's, or one on a profile the caller can edit); returns its id. */
4423
+ async deleteDraft(draftId, option) {
4424
+ var _a, _b;
4425
+ const res = await client.request(
4426
+ `mutation deleteDraft($draftId: String!) { deleteDraft(draftId: $draftId) { id } }`,
4427
+ { draftId },
4428
+ option
4429
+ );
4430
+ return (_b = (_a = res.data) == null ? void 0 : _a.deleteDraft) == null ? void 0 : _b.id;
4431
+ },
4432
+ /** Deletes a refusal analysis (its owner's, or one on a profile the caller can edit); returns its id. */
4433
+ async deleteRefusalAnalysis(id, option) {
4434
+ var _a, _b;
4435
+ const res = await client.request(
4436
+ `mutation deleteRefusalAnalysis($id: String!) { deleteRefusalAnalysis(id: $id) { id } }`,
4437
+ { id },
4438
+ option
4439
+ );
4440
+ return (_b = (_a = res.data) == null ? void 0 : _a.deleteRefusalAnalysis) == null ? void 0 : _b.id;
4441
+ },
4442
+ /** Deletes a readiness check run without a visa profile, with its documents; returns its id. */
4443
+ async deleteReadinessCheck(readinessProfileId, option) {
4444
+ var _a, _b;
4445
+ const res = await client.request(
4446
+ `mutation deleteReadinessCheck($readinessProfileId: String!) { deleteReadinessCheck(readinessProfileId: $readinessProfileId) { id } }`,
4447
+ { readinessProfileId },
4448
+ option
4449
+ );
4450
+ return (_b = (_a = res.data) == null ? void 0 : _a.deleteReadinessCheck) == null ? void 0 : _b.id;
4451
+ },
4411
4452
  /** Stores a file for the AI to read when there's no visa profile; returns its URL. */
4412
4453
  async uploadDraftFile(file) {
4413
4454
  const formData = new FormData();