@connect-plus-online/ogabai-integrations 0.0.27 → 0.0.29
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 +58 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +48 -2
- package/dist/index.d.ts +48 -2
- package/dist/index.esm.js +58 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -214,6 +214,27 @@ var userSchema = {
|
|
|
214
214
|
var user_schema_default = userSchema;
|
|
215
215
|
|
|
216
216
|
// src/services/user/user.entity.ts
|
|
217
|
+
var notificationQuery = [
|
|
218
|
+
"createdAt",
|
|
219
|
+
"description",
|
|
220
|
+
"id",
|
|
221
|
+
"notificationAction",
|
|
222
|
+
"notificationStatus",
|
|
223
|
+
"notificationType",
|
|
224
|
+
"title",
|
|
225
|
+
"updatedAt"
|
|
226
|
+
];
|
|
227
|
+
var userNotificationQuery = [
|
|
228
|
+
"createdAt",
|
|
229
|
+
"id",
|
|
230
|
+
"notificationStatus",
|
|
231
|
+
"updatedAt",
|
|
232
|
+
"userId",
|
|
233
|
+
"itemId",
|
|
234
|
+
"notificationId",
|
|
235
|
+
"notification",
|
|
236
|
+
"storeId"
|
|
237
|
+
];
|
|
217
238
|
var transactionCountsQuery = [
|
|
218
239
|
"totalTx",
|
|
219
240
|
"totalTxThisMonth",
|
|
@@ -703,6 +724,42 @@ var createAuthService = (client) => ({
|
|
|
703
724
|
}
|
|
704
725
|
});
|
|
705
726
|
|
|
727
|
+
// src/services/user/schemas/user-notification.schema.ts
|
|
728
|
+
var userNotificationSchema = {
|
|
729
|
+
getUserNotifications: (query) => `
|
|
730
|
+
query getUserNotifications($search: String, $userNotification: UserNotificationInput, $userNotificationIds: [String], $limit: Int!, $skip: Int!) {
|
|
731
|
+
getUserNotifications(search: $search, userNotification: $userNotification, userNotificationIds: $userNotificationIds, limit: $limit, skip: $skip) {
|
|
732
|
+
${query}
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
`
|
|
736
|
+
};
|
|
737
|
+
|
|
738
|
+
// src/services/user/types/user-notification.type.ts
|
|
739
|
+
var getUserNotificationsResponseFields = ["userNotifications"];
|
|
740
|
+
var getUserNotificationsResponseNestedFields = {
|
|
741
|
+
notification: notificationQuery,
|
|
742
|
+
userNotifications: userNotificationQuery
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
// src/services/user/user-notification.service.ts
|
|
746
|
+
var createUserNotificationService = (client) => ({
|
|
747
|
+
async getUserNotifications(input, fetchFields, option) {
|
|
748
|
+
var _a, _b, _c;
|
|
749
|
+
const res = await client.request(
|
|
750
|
+
userNotificationSchema.getUserNotifications(
|
|
751
|
+
gqlQueryStringBuilder(
|
|
752
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getUserNotificationsResponseFields,
|
|
753
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUserNotificationsResponseNestedFields
|
|
754
|
+
)
|
|
755
|
+
),
|
|
756
|
+
input,
|
|
757
|
+
option
|
|
758
|
+
);
|
|
759
|
+
return (_c = res.data) == null ? void 0 : _c.getUserNotifications;
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
|
|
706
763
|
// src/services/inventory/types/product.type.ts
|
|
707
764
|
var getProductResponseFields = [
|
|
708
765
|
"product"
|
|
@@ -1848,7 +1905,6 @@ var saleQuery = [
|
|
|
1848
1905
|
"packageId",
|
|
1849
1906
|
"productId",
|
|
1850
1907
|
"quantity",
|
|
1851
|
-
"quantityInMetricUnit",
|
|
1852
1908
|
"storeId"
|
|
1853
1909
|
];
|
|
1854
1910
|
|
|
@@ -2128,6 +2184,7 @@ exports.createStoreCategoryService = createStoreCategoryService;
|
|
|
2128
2184
|
exports.createStoreService = createStoreService;
|
|
2129
2185
|
exports.createTransactionService = createTransactionService;
|
|
2130
2186
|
exports.createTransport = createTransport;
|
|
2187
|
+
exports.createUserNotificationService = createUserNotificationService;
|
|
2131
2188
|
exports.createUserService = createUserService;
|
|
2132
2189
|
exports.getOrderResponse = getOrderResponse;
|
|
2133
2190
|
exports.getOrderResponseNestedFields = getOrderResponseNestedFields;
|