@visa-check-r/integrations 0.0.122 → 0.0.124

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
@@ -4421,6 +4421,36 @@ var createAIServerService = (client) => {
4421
4421
  );
4422
4422
  return (_b = (_a = res.data) == null ? void 0 : _a.attachRefusalAnalysis) == null ? void 0 : _b.refusalAnalysis;
4423
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
+ },
4424
4454
  /** Stores a file for the AI to read when there's no visa profile; returns its URL. */
4425
4455
  async uploadDraftFile(file) {
4426
4456
  const formData = new FormData();
@@ -4461,17 +4491,18 @@ var createAdminAnalyticsService = (client) => ({
4461
4491
  });
4462
4492
 
4463
4493
  // src/services/partner-link/index.ts
4494
+ var LINK_REQUEST = "id partnerId partnerName code clientId clientName clientEmail status requestedAt respondedAt";
4464
4495
  var PARTNER = "partner { id fullName code }";
4465
4496
  var createPartnerLinkService = (client) => ({
4466
4497
  async getLinkedPartner(option) {
4467
4498
  var _a;
4468
- const res = await client.request(`query getLinkedPartner { getLinkedPartner { ${PARTNER} } }`, {}, option);
4499
+ const res = await client.request(`query getLinkedPartner { getLinkedPartner { ${PARTNER} status } }`, {}, option);
4469
4500
  return (_a = res.data) == null ? void 0 : _a.getLinkedPartner;
4470
4501
  },
4471
4502
  async linkPartner(input, option) {
4472
4503
  var _a;
4473
4504
  const res = await client.request(
4474
- `mutation linkPartner($referralCode: String!) { linkPartner(referralCode: $referralCode) { ${PARTNER} profilesShared } }`,
4505
+ `mutation linkPartner($referralCode: String!) { linkPartner(referralCode: $referralCode) { ${PARTNER} status profilesShared } }`,
4475
4506
  input,
4476
4507
  option
4477
4508
  );
@@ -4479,8 +4510,48 @@ var createPartnerLinkService = (client) => ({
4479
4510
  },
4480
4511
  async unlinkPartner(option) {
4481
4512
  var _a;
4482
- const res = await client.request(`mutation unlinkPartner { unlinkPartner { profilesUnshared } }`, {}, option);
4513
+ const res = await client.request(`mutation unlinkPartner { unlinkPartner { profilesUnshared requestCancelled } }`, {}, option);
4483
4514
  return (_a = res.data) == null ? void 0 : _a.unlinkPartner;
4515
+ },
4516
+ /** Partners: clients waiting for an answer, oldest first. */
4517
+ async listLinkRequests(option) {
4518
+ var _a, _b, _c;
4519
+ const res = await client.request(
4520
+ `query listLinkRequests { listLinkRequests { linkRequests { ${LINK_REQUEST} } } }`,
4521
+ {},
4522
+ option
4523
+ );
4524
+ return (_c = (_b = (_a = res.data) == null ? void 0 : _a.listLinkRequests) == null ? void 0 : _b.linkRequests) != null ? _c : [];
4525
+ },
4526
+ /** Partners: link the client and see their visa profiles. */
4527
+ async acceptLinkRequest(id, option) {
4528
+ var _a, _b;
4529
+ const res = await client.request(
4530
+ `mutation acceptLinkRequest($id: String!) { acceptLinkRequest(id: $id) { linkRequest { ${LINK_REQUEST} } } }`,
4531
+ { id },
4532
+ option
4533
+ );
4534
+ return (_b = (_a = res.data) == null ? void 0 : _a.acceptLinkRequest) == null ? void 0 : _b.linkRequest;
4535
+ },
4536
+ /** Partners: turn a client's request down. */
4537
+ async declineLinkRequest(id, option) {
4538
+ var _a, _b;
4539
+ const res = await client.request(
4540
+ `mutation declineLinkRequest($id: String!) { declineLinkRequest(id: $id) { linkRequest { ${LINK_REQUEST} } } }`,
4541
+ { id },
4542
+ option
4543
+ );
4544
+ return (_b = (_a = res.data) == null ? void 0 : _a.declineLinkRequest) == null ? void 0 : _b.linkRequest;
4545
+ },
4546
+ /** Partners: clients, ready and flagged profiles, and waiting link requests. */
4547
+ async partnerDashboard(option) {
4548
+ var _a;
4549
+ const res = await client.request(
4550
+ `query partnerDashboard { partnerDashboard { clients readyToSubmit flagged pendingRequests } }`,
4551
+ {},
4552
+ option
4553
+ );
4554
+ return (_a = res.data) == null ? void 0 : _a.partnerDashboard;
4484
4555
  }
4485
4556
  });
4486
4557