@quesmed/types 2.2.89 → 2.2.90

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.
@@ -11,4 +11,5 @@ export interface INewNotification {
11
11
  export declare type IOnNotificationPublisherData = RootData<INewNotification, 'onNotificationArise'>;
12
12
  export declare type IOnNotificationAriseData = RootData<INotification[], 'onNotificationArise'>;
13
13
  export declare const ON_NOTIFICATION_ARISE = "ON_NOTIFICATION_ARISE";
14
+ export declare const NOTIFICATION_ARISE: import("@apollo/client").DocumentNode;
14
15
  export declare const onNotificationArise: ({ client, subscriptionData, }: OnSubscriptionDataOptions<IOnNotificationAriseData>) => void;
@@ -1,8 +1,37 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.onNotificationArise = exports.ON_NOTIFICATION_ARISE = void 0;
3
+ exports.onNotificationArise = exports.NOTIFICATION_ARISE = exports.ON_NOTIFICATION_ARISE = void 0;
4
+ const client_1 = require("@apollo/client");
4
5
  const restricted_1 = require("../query/restricted");
5
6
  exports.ON_NOTIFICATION_ARISE = 'ON_NOTIFICATION_ARISE';
7
+ exports.NOTIFICATION_ARISE = (0, client_1.gql) `
8
+ subscription OnNotificationArise($userId: Int!) {
9
+ onNotificationArise(userId: $userId) {
10
+ userId
11
+ read
12
+ type
13
+ id
14
+ description
15
+ actionType
16
+ createdAt
17
+ fromUser {
18
+ id
19
+ displayName
20
+ }
21
+ comment {
22
+ id
23
+ comment
24
+ question {
25
+ id
26
+ concept {
27
+ id
28
+ name
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+ `;
6
35
  const onNotificationArise = ({ client, subscriptionData, }) => {
7
36
  const { onNotificationArise } = subscriptionData.data || {};
8
37
  if (onNotificationArise) {
@@ -11,4 +11,5 @@ export interface INewNotification {
11
11
  export declare type IOnNotificationPublisherData = RootData<INewNotification, 'onNotificationArise'>;
12
12
  export declare type IOnNotificationAriseData = RootData<INotification[], 'onNotificationArise'>;
13
13
  export declare const ON_NOTIFICATION_ARISE = "ON_NOTIFICATION_ARISE";
14
+ export declare const NOTIFICATION_ARISE: import("@apollo/client").DocumentNode;
14
15
  export declare const onNotificationArise: ({ client, subscriptionData, }: OnSubscriptionDataOptions<IOnNotificationAriseData>) => void;
@@ -1,5 +1,34 @@
1
+ import { gql } from '@apollo/client';
1
2
  import { NOTIFICATIONS, } from '../query/restricted';
2
3
  export const ON_NOTIFICATION_ARISE = 'ON_NOTIFICATION_ARISE';
4
+ export const NOTIFICATION_ARISE = gql `
5
+ subscription OnNotificationArise($userId: Int!) {
6
+ onNotificationArise(userId: $userId) {
7
+ userId
8
+ read
9
+ type
10
+ id
11
+ description
12
+ actionType
13
+ createdAt
14
+ fromUser {
15
+ id
16
+ displayName
17
+ }
18
+ comment {
19
+ id
20
+ comment
21
+ question {
22
+ id
23
+ concept {
24
+ id
25
+ name
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
31
+ `;
3
32
  export const onNotificationArise = ({ client, subscriptionData, }) => {
4
33
  const { onNotificationArise } = subscriptionData.data || {};
5
34
  if (onNotificationArise) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.2.89",
3
+ "version": "2.2.90",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",