@visa-check-r/integrations 0.0.86 → 0.0.88

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
@@ -250,6 +250,15 @@ var userSchema = {
250
250
  };
251
251
 
252
252
  // src/services/user/user.entity.ts
253
+ var notificationQuery = [
254
+ "id",
255
+ "userId",
256
+ "title",
257
+ "message",
258
+ "isRead",
259
+ "createdAt",
260
+ "shortname"
261
+ ];
253
262
  var partnerMatricesQuery = [
254
263
  "approvedApplications",
255
264
  "rejectedApplications",
@@ -1370,6 +1379,106 @@ var createUserCreditService = (client) => ({
1370
1379
  )
1371
1380
  });
1372
1381
 
1382
+ // src/services/user/schemas/notification.schema.ts
1383
+ var notificationSchema = {
1384
+ get: {
1385
+ operation: "query",
1386
+ name: "getNotification",
1387
+ variables: "($notification: NotificationInput!)",
1388
+ field: "(notification: $notification)"
1389
+ },
1390
+ list: {
1391
+ operation: "query",
1392
+ name: "listNotifications",
1393
+ variables: "($limit: Int!, $skip: Int!, $search: String, $notification: NotificationInput, $notificationIds: [String])",
1394
+ field: "(limit: $limit, skip: $skip, search: $search, notification: $notification, notificationIds: $notificationIds)"
1395
+ },
1396
+ create: {
1397
+ operation: "mutation",
1398
+ name: "createNotification",
1399
+ variables: "($notification: NotificationInput!)",
1400
+ field: "(notification: $notification)"
1401
+ },
1402
+ update: {
1403
+ operation: "mutation",
1404
+ name: "updateNotification",
1405
+ variables: "($notificationId: String!, $notification: NotificationInput!)",
1406
+ field: "(notificationId: $notificationId, notification: $notification)"
1407
+ },
1408
+ delete: {
1409
+ operation: "mutation",
1410
+ name: "deleteNotification",
1411
+ variables: "($notificationId: String!)",
1412
+ field: "(notificationId: $notificationId)"
1413
+ }
1414
+ };
1415
+
1416
+ // src/services/user/types/notification.type.ts
1417
+ var ENTITY2 = "notification";
1418
+ var notificationIntegration = createStandardEntityIntegration({
1419
+ key: ENTITY2,
1420
+ fields: notificationQuery
1421
+ });
1422
+ var notificationListIntegration = createListIntegration({
1423
+ key: "notifications",
1424
+ fields: notificationQuery
1425
+ });
1426
+ var notificationDeleteIntegration = createDeleteIntegration(ENTITY2);
1427
+
1428
+ // src/services/user/notification.service.ts
1429
+ var createNotificationService = (client) => ({
1430
+ // get notification
1431
+ getNotification: createOperationExecutor(
1432
+ client,
1433
+ "getNotification",
1434
+ {
1435
+ schema: buildSchema(notificationSchema.get),
1436
+ defaultRootFields: notificationIntegration.get.responseFields,
1437
+ defaultNestedFields: notificationIntegration.get.nestedFields
1438
+ }
1439
+ ),
1440
+ // list notifications
1441
+ listNotifications: createOperationExecutor(
1442
+ client,
1443
+ "listNotifications",
1444
+ {
1445
+ schema: buildSchema(notificationSchema.list),
1446
+ defaultRootFields: [...notificationListIntegration.responseFields],
1447
+ defaultNestedFields: notificationListIntegration.nestedFields
1448
+ }
1449
+ ),
1450
+ // create notification
1451
+ createNotification: createOperationExecutor(
1452
+ client,
1453
+ "createNotification",
1454
+ {
1455
+ schema: buildSchema(notificationSchema.create),
1456
+ defaultRootFields: notificationIntegration.create.responseFields,
1457
+ defaultNestedFields: notificationIntegration.create.nestedFields
1458
+ }
1459
+ ),
1460
+ // update notification
1461
+ updateNotification: createOperationExecutor(
1462
+ client,
1463
+ "updateNotification",
1464
+ {
1465
+ schema: buildSchema(notificationSchema.update),
1466
+ defaultRootFields: notificationIntegration.update.responseFields,
1467
+ defaultNestedFields: notificationIntegration.update.nestedFields
1468
+ }
1469
+ ),
1470
+ // delete notification
1471
+ deleteNotification: createOperationExecutor(
1472
+ client,
1473
+ "deleteNotification",
1474
+ {
1475
+ schema: buildSchema(notificationSchema.delete),
1476
+ defaultRootFields: notificationDeleteIntegration.responseFields,
1477
+ defaultNestedFields: {}
1478
+ }
1479
+ )
1480
+ });
1481
+
1373
1482
  // src/services/checklist/schemas/checklist-item.schema.ts
1374
1483
  var checklistItemSchema = {
1375
1484
  getChecklistItemCount: (query) => `
@@ -1660,8 +1769,9 @@ var deleteVisaProfileChecklistItemResponse = ["visaProfileChecklistItemId"];
1660
1769
  var createVisaProfileChecklistItemService = (client) => ({
1661
1770
  // upload file
1662
1771
  async uploadChecklistImage(form) {
1772
+ var _a;
1663
1773
  const fileClient = createFileService(client);
1664
- return (await fileClient.uploadFile(form)).visaProfileChecklistItem;
1774
+ return (_a = await fileClient.uploadFile(form)) == null ? void 0 : _a.visaProfileChecklistItem;
1665
1775
  },
1666
1776
  async deleteVisaProfileChecklistItem(input, fetchFields, option) {
1667
1777
  var _a, _b;
@@ -2925,21 +3035,21 @@ var serviceCreditCostQuery = [
2925
3035
  ];
2926
3036
 
2927
3037
  // src/services/subscription/types/coupon.type.ts
2928
- var ENTITY2 = "coupon";
3038
+ var ENTITY3 = "coupon";
2929
3039
  var couponIntegration = createStandardEntityIntegration({
2930
- key: ENTITY2,
3040
+ key: ENTITY3,
2931
3041
  fields: couponQuery
2932
3042
  });
2933
3043
  var couponListIntegration = createListIntegration({
2934
3044
  key: "coupons",
2935
3045
  fields: couponQuery
2936
3046
  });
2937
- var couponDeleteIntegration = createDeleteIntegration(ENTITY2);
3047
+ var couponDeleteIntegration = createDeleteIntegration(ENTITY3);
2938
3048
 
2939
3049
  // src/services/subscription/types/coupon-redemption.type.ts
2940
- var ENTITY3 = "couponRedemption";
3050
+ var ENTITY4 = "couponRedemption";
2941
3051
  var couponRedemptionIntegration = createStandardEntityIntegration({
2942
- key: ENTITY3,
3052
+ key: ENTITY4,
2943
3053
  fields: couponRedemptionQuery,
2944
3054
  nested: {
2945
3055
  ...couponIntegration.get.nestedFields
@@ -2952,24 +3062,24 @@ var couponRedemptionListIntegration = createListIntegration({
2952
3062
  ...couponIntegration.get.nestedFields
2953
3063
  }
2954
3064
  });
2955
- var couponRedemptionDeleteIntegration = createDeleteIntegration(ENTITY3);
3065
+ var couponRedemptionDeleteIntegration = createDeleteIntegration(ENTITY4);
2956
3066
 
2957
3067
  // src/services/subscription/types/credit-plan.type.ts
2958
- var ENTITY4 = "creditPlan";
3068
+ var ENTITY5 = "creditPlan";
2959
3069
  var creditPlanIntegration = createStandardEntityIntegration({
2960
- key: ENTITY4,
3070
+ key: ENTITY5,
2961
3071
  fields: creditPlanQuery
2962
3072
  });
2963
3073
  var creditPlanListIntegration = createListIntegration({
2964
3074
  key: "creditPlans",
2965
3075
  fields: creditPlanQuery
2966
3076
  });
2967
- var creditPlanDeleteIntegration = createDeleteIntegration(ENTITY4);
3077
+ var creditPlanDeleteIntegration = createDeleteIntegration(ENTITY5);
2968
3078
 
2969
3079
  // src/services/subscription/types/credit-transaction.type.ts
2970
- var ENTITY5 = "creditTransaction";
3080
+ var ENTITY6 = "creditTransaction";
2971
3081
  var creditTransactionIntegration = createStandardEntityIntegration({
2972
- key: ENTITY5,
3082
+ key: ENTITY6,
2973
3083
  fields: creditTransactionQuery,
2974
3084
  nested: {
2975
3085
  ...getUserResponseNestedFields
@@ -2982,19 +3092,19 @@ var creditTransactionListIntegration = createListIntegration({
2982
3092
  ...getUserResponseNestedFields
2983
3093
  }
2984
3094
  });
2985
- var creditTransactionDeleteIntegration = createDeleteIntegration(ENTITY5);
3095
+ var creditTransactionDeleteIntegration = createDeleteIntegration(ENTITY6);
2986
3096
 
2987
3097
  // src/services/subscription/types/service-credit-cost.type.ts
2988
- var ENTITY6 = "serviceCreditCost";
3098
+ var ENTITY7 = "serviceCreditCost";
2989
3099
  var serviceCreditCostIntegration = createStandardEntityIntegration({
2990
- key: ENTITY6,
3100
+ key: ENTITY7,
2991
3101
  fields: serviceCreditCostQuery
2992
3102
  });
2993
3103
  var serviceCreditCostListIntegration = createListIntegration({
2994
3104
  key: "serviceCreditCosts",
2995
3105
  fields: serviceCreditCostQuery
2996
3106
  });
2997
- var serviceCreditCostDeleteIntegration = createDeleteIntegration(ENTITY6);
3107
+ var serviceCreditCostDeleteIntegration = createDeleteIntegration(ENTITY7);
2998
3108
 
2999
3109
  // src/services/subscription/schemas/flutter-customer.schema.ts
3000
3110
  var flutterSchema = {
@@ -3635,6 +3745,7 @@ exports.createCreditPlanService = createCreditPlanService;
3635
3745
  exports.createCreditTransactionService = createCreditTransactionService;
3636
3746
  exports.createCustomerObjectResponse = createCustomerObjectResponse;
3637
3747
  exports.createFlutterwaveService = createFlutterwaveService;
3748
+ exports.createNotificationService = createNotificationService;
3638
3749
  exports.createPaystackService = createPaystackService;
3639
3750
  exports.createReadinessScoreReviewResponseFields = createReadinessScoreReviewResponseFields;
3640
3751
  exports.createReadinessScoreReviewResponseNestedFields = createReadinessScoreReviewResponseNestedFields;