phx-node 1.0.60 → 1.0.62

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.
@@ -37,13 +37,14 @@ exports.QUERY_GET_LIST_NOTIFICATION_BY_ACTION = (0, graphql_request_1.gql) `
37
37
  }
38
38
  }
39
39
  `;
40
- exports.QUERY_GET_STATISTICAL_NOTIFICATION_UNREAD_BY_MODULE = (0, graphql_request_1.gql) `
40
+ const QUERY_GET_STATISTICAL_NOTIFICATION_UNREAD_BY_MODULE = (studentCode) => `
41
41
  query MyQuery(
42
42
  $hostname: String!
43
43
  $app: String!
44
44
  $device_id: String!
45
45
  $user_id: Int!
46
46
  $module_code: String!
47
+ $action: String!
47
48
  ) {
48
49
  feature_mobile_push_count_notification_unread(
49
50
  where: {
@@ -53,6 +54,8 @@ exports.QUERY_GET_STATISTICAL_NOTIFICATION_UNREAD_BY_MODULE = (0, graphql_reques
53
54
  device_id: { _eq: $device_id }
54
55
  user_id: { _eq: $user_id }
55
56
  module_code: { _eq: $module_code }
57
+ action: { _eq: $action }
58
+ ${studentCode ? `student_code: {_eq: "${studentCode}"}` : ''}
56
59
  }
57
60
  ) {
58
61
  total_notification
@@ -60,17 +63,20 @@ exports.QUERY_GET_STATISTICAL_NOTIFICATION_UNREAD_BY_MODULE = (0, graphql_reques
60
63
  }
61
64
  }
62
65
  `;
63
- exports.MUTATION_UPDATE_NOTIFICATION_UNREAD = `
64
- mutation MyMutation($hostname: String!, $app: String!, $device_id: String!, $module_code: String!, $user_id: Int!, $total_notification: Int!, $total_notification_important: Int!) {
65
- update_feature_mobile_push_count_notification_unread(where: {deleted_at: {_is_null: true}, hostname: {_eq: $hostname}, module_code: {_eq: $module_code}, app: {_eq: $app}, device_id: {_eq: $device_id}, user_id: {_eq: $user_id}}, _set: {total_notification: $total_notification, total_notification_important: $total_notification_important, updated_at: "now"}) {
66
- returning {
67
- total_notification
68
- total_notification_important
69
- module_code
66
+ exports.QUERY_GET_STATISTICAL_NOTIFICATION_UNREAD_BY_MODULE = QUERY_GET_STATISTICAL_NOTIFICATION_UNREAD_BY_MODULE;
67
+ const MUTATION_UPDATE_NOTIFICATION_UNREAD = (studentCode) => `
68
+ mutation MyMutation($hostname: String!, $app: String!, $device_id: String!, $module_code: String!, $user_id: Int!, $total_notification: Int!, $total_notification_important: Int!, $action: String!) {
69
+ update_feature_mobile_push_count_notification_unread(where: {deleted_at: {_is_null: true}, hostname: {_eq: $hostname}, module_code: {_eq: $module_code}, app: {_eq: $app}, device_id: {_eq: $device_id}, user_id: {_eq: $user_id}, action: {_eq: $action}, ${studentCode ? `student_code: {_eq: "${studentCode}"}` : ''}}, _set: {total_notification: $total_notification, total_notification_important: $total_notification_important, updated_at: "now"}) {
70
+ returning {
71
+ id
72
+ total_notification
73
+ total_notification_important
74
+ module_code
75
+ }
76
+ }
70
77
  }
71
- }
72
- }
73
78
  `;
79
+ exports.MUTATION_UPDATE_NOTIFICATION_UNREAD = MUTATION_UPDATE_NOTIFICATION_UNREAD;
74
80
  exports.MUTATION_UPDATE_READ_NOTIFICATION = (0, graphql_request_1.gql) `
75
81
  mutation MyMutation($id: Int!) {
76
82
  update_feature_mobile_push(
@@ -80,20 +86,22 @@ exports.MUTATION_UPDATE_READ_NOTIFICATION = (0, graphql_request_1.gql) `
80
86
  returning {
81
87
  type
82
88
  module_code
89
+ action
90
+ payload
83
91
  }
84
92
  }
85
93
  }
86
94
  `;
87
95
  exports.MUTATION_INSERT_NOTIFICATION = `
88
- mutation MyMutation($total_notification: Int!, $total_notification_important: Int!, $user_id: Int!, $hostname: String!, $app: String!, $device_id: String!, $module_code: String!) {
89
- insert_feature_mobile_push_count_notification_unread(objects: {app: $app, created_at: "now", hostname: $hostname, module_code: $module_code, total_notification: $total_notification, total_notification_important: $total_notification_important, user_id: $user_id, device_id: $device_id}) {
90
- returning {
91
- total_notification_important
92
- total_notification
93
- module_code
96
+ mutation MyMutation($total_notification: Int!, $total_notification_important: Int!, $user_id: Int!, $hostname: String!, $app: String!, $device_id: String!, $module_code: String!, $action: String!, $student_code: String = null) {
97
+ insert_feature_mobile_push_count_notification_unread(objects: {app: $app, created_at: "now", hostname: $hostname, module_code: $module_code, total_notification: $total_notification, total_notification_important: $total_notification_important, user_id: $user_id, device_id: $device_id, action: $action, student_code: $student_code}) {
98
+ returning {
99
+ total_notification_important
100
+ total_notification
101
+ module_code
102
+ }
103
+ }
94
104
  }
95
- }
96
- }
97
105
  `;
98
106
  exports.MUTATION_UPDATE_READ_NOTIFICATION_IN_DETAIL_FORM = (0, graphql_request_1.gql) `
99
107
  mutation MyMutation($app: String!, $device_id: String!, $user_id: Int!, $hostname: String!, $action: String!, $form_id: Int!) {
@@ -101,6 +109,8 @@ exports.MUTATION_UPDATE_READ_NOTIFICATION_IN_DETAIL_FORM = (0, graphql_request_1
101
109
  returning {
102
110
  type
103
111
  module_code
112
+ payload
113
+ action
104
114
  }
105
115
  }
106
116
  }
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/query/notification/query.ts"],"names":[],"mappings":";;;AAAA,qDAAoC;AAEvB,QAAA,qCAAqC,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCvD,CAAC;AAEW,QAAA,mDAAmD,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;CAsBrE,CAAC;AAEW,QAAA,mCAAmC,GAAG;;;;;;;;;;CAUlD,CAAC;AAEW,QAAA,iCAAiC,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;CAYnD,CAAC;AAEW,QAAA,4BAA4B,GAAG;;;;;;;;;;CAU3C,CAAC;AAEW,QAAA,gDAAgD,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;CASlE,CAAC"}
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/query/notification/query.ts"],"names":[],"mappings":";;;AAAA,qDAAoC;AAEvB,QAAA,qCAAqC,GAAG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