@visa-check-r/integrations 0.0.116 → 0.0.118

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
@@ -342,7 +342,13 @@ var userSettingQuery = [
342
342
  "userSettingDocReviewFeedback",
343
343
  "userSettingNewMessageFromClient",
344
344
  "userSettingNewMessageFromConsultant",
345
- "userSettingSubmissionConfirmation"
345
+ "userSettingSubmissionConfirmation",
346
+ "userSettingReadinessCheckReady",
347
+ "userSettingDocumentReminder",
348
+ "userSettingSopLoeReady",
349
+ "userSettingRefusalAnalysisReady",
350
+ "userSettingPartnerActivity",
351
+ "userSettingLowCredit"
346
352
  ];
347
353
  var userCreditQuery = [
348
354
  "amount",
@@ -4301,6 +4307,7 @@ var aiServerSchema = {
4301
4307
  };
4302
4308
 
4303
4309
  // src/services/ai-integration/ai-server.service.ts
4310
+ var refusalAnalysisFields = "id ownerId visaProfileId fileName fileUrl summary createdAt refusalFindings { severity title explanation recommendation action }";
4304
4311
  var createAIServerService = (client) => {
4305
4312
  return {
4306
4313
  async getAIServerAuth(input, fetchFields, option) {
@@ -4351,6 +4358,46 @@ var createAIServerService = (client) => {
4351
4358
  );
4352
4359
  return (_b = (_a = res.data) == null ? void 0 : _a.attachDraft) == null ? void 0 : _b.draft;
4353
4360
  },
4361
+ /** Keeps a finished refusal analysis: on a visa profile, or as the caller's own when none is given. */
4362
+ async saveRefusalAnalysis(input, option) {
4363
+ var _a, _b;
4364
+ const res = await client.request(
4365
+ `mutation saveRefusalAnalysis($refusalAnalysis: RefusalAnalysisInput!) { saveRefusalAnalysis(refusalAnalysis: $refusalAnalysis) { refusalAnalysis { ${refusalAnalysisFields} } } }`,
4366
+ input,
4367
+ option
4368
+ );
4369
+ return (_b = (_a = res.data) == null ? void 0 : _a.saveRefusalAnalysis) == null ? void 0 : _b.refusalAnalysis;
4370
+ },
4371
+ /** A visa profile's refusal analyses, or with no profile, the caller's own unattached ones. Newest first. */
4372
+ async listRefusalAnalyses(input = {}, option) {
4373
+ var _a, _b, _c;
4374
+ const res = await client.request(
4375
+ `query listRefusalAnalyses($visaProfileId: String) { listRefusalAnalyses(visaProfileId: $visaProfileId) { refusalAnalyses { ${refusalAnalysisFields} } } }`,
4376
+ input,
4377
+ option
4378
+ );
4379
+ return (_c = (_b = (_a = res.data) == null ? void 0 : _a.listRefusalAnalyses) == null ? void 0 : _b.refusalAnalyses) != null ? _c : [];
4380
+ },
4381
+ /** A saved refusal analysis, to read it again. */
4382
+ async getRefusalAnalysis(input, option) {
4383
+ var _a, _b;
4384
+ const res = await client.request(
4385
+ `query getRefusalAnalysis($id: String!) { getRefusalAnalysis(id: $id) { refusalAnalysis { ${refusalAnalysisFields} } } }`,
4386
+ input,
4387
+ option
4388
+ );
4389
+ return (_b = (_a = res.data) == null ? void 0 : _a.getRefusalAnalysis) == null ? void 0 : _b.refusalAnalysis;
4390
+ },
4391
+ /** Moves the caller's own refusal analysis onto a visa profile. */
4392
+ async attachRefusalAnalysis(input, option) {
4393
+ var _a, _b;
4394
+ const res = await client.request(
4395
+ `mutation attachRefusalAnalysis($id: String!, $visaProfileId: String!) { attachRefusalAnalysis(id: $id, visaProfileId: $visaProfileId) { refusalAnalysis { ${refusalAnalysisFields} } } }`,
4396
+ input,
4397
+ option
4398
+ );
4399
+ return (_b = (_a = res.data) == null ? void 0 : _a.attachRefusalAnalysis) == null ? void 0 : _b.refusalAnalysis;
4400
+ },
4354
4401
  /** Stores a file for the AI to read when there's no visa profile; returns its URL. */
4355
4402
  async uploadDraftFile(file) {
4356
4403
  const formData = new FormData();
@@ -4414,6 +4461,26 @@ var createPartnerLinkService = (client) => ({
4414
4461
  }
4415
4462
  });
4416
4463
 
4464
+ // src/services/school/index.ts
4465
+ var SCHOOL = "id dliNumber name province city campus sector gradPrograms pgwp";
4466
+ var createSchoolService = (client) => ({
4467
+ async searchSchools(input = {}, option) {
4468
+ var _a;
4469
+ const res = await client.request(
4470
+ `query searchSchools($search: String, $limit: Int) { searchSchools(search: $search, limit: $limit) { schools { ${SCHOOL} } total } }`,
4471
+ input,
4472
+ option
4473
+ );
4474
+ return (_a = res.data) == null ? void 0 : _a.searchSchools;
4475
+ },
4476
+ /** Admin only: download IRCC's list again and replace the stored one. */
4477
+ async syncSchools(option) {
4478
+ var _a;
4479
+ const res = await client.request(`mutation syncSchools { syncSchools { total syncedAt } }`, {}, option);
4480
+ return (_a = res.data) == null ? void 0 : _a.syncSchools;
4481
+ }
4482
+ });
4483
+
4417
4484
  // src/services/help/index.ts
4418
4485
  var ARTICLE = "id title description content";
4419
4486
  var createHelpService = (client) => ({
@@ -4533,6 +4600,7 @@ exports.createReadinessScoreReviewService = createReadinessScoreReviewService;
4533
4600
  exports.createSOPReviewResponseFields = createSOPReviewResponseFields;
4534
4601
  exports.createSOPReviewResponseNestedFields = createSOPReviewResponseNestedFields;
4535
4602
  exports.createSOPReviewService = createSOPReviewService;
4603
+ exports.createSchoolService = createSchoolService;
4536
4604
  exports.createServiceCreditCostService = createServiceCreditCostService;
4537
4605
  exports.createSubscriptionService = createSubscriptionService;
4538
4606
  exports.createTransport = createTransport;