@things-factory/notification 6.1.23 → 6.1.28

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.
Files changed (47) hide show
  1. package/dist-client/pages/noti-box/noti-box-list-page.d.ts +49 -0
  2. package/dist-client/pages/noti-box/noti-box-list-page.js +262 -0
  3. package/dist-client/pages/noti-box/noti-box-list-page.js.map +1 -0
  4. package/dist-client/pages/noti-rule/noti-rule-importer.d.ts +22 -0
  5. package/dist-client/pages/noti-rule/noti-rule-importer.js +100 -0
  6. package/dist-client/pages/noti-rule/noti-rule-importer.js.map +1 -0
  7. package/dist-client/pages/noti-rule/noti-rule-list-page.d.ts +62 -0
  8. package/dist-client/pages/noti-rule/noti-rule-list-page.js +380 -0
  9. package/dist-client/pages/noti-rule/noti-rule-list-page.js.map +1 -0
  10. package/dist-client/tsconfig.tsbuildinfo +1 -1
  11. package/dist-server/service/noti-box/index.js +9 -0
  12. package/dist-server/service/noti-box/index.js.map +1 -0
  13. package/dist-server/service/noti-box/noti-box-mutation.js +110 -0
  14. package/dist-server/service/noti-box/noti-box-mutation.js.map +1 -0
  15. package/dist-server/service/noti-box/noti-box-query.js +109 -0
  16. package/dist-server/service/noti-box/noti-box-query.js.map +1 -0
  17. package/dist-server/service/noti-box/noti-box-type.js +69 -0
  18. package/dist-server/service/noti-box/noti-box-type.js.map +1 -0
  19. package/dist-server/service/noti-box/noti-box.js +107 -0
  20. package/dist-server/service/noti-box/noti-box.js.map +1 -0
  21. package/dist-server/service/noti-rule/event-subscriber.js +21 -0
  22. package/dist-server/service/noti-rule/event-subscriber.js.map +1 -0
  23. package/dist-server/service/noti-rule/index.js +12 -0
  24. package/dist-server/service/noti-rule/index.js.map +1 -0
  25. package/dist-server/service/noti-rule/noti-rule-history.js +139 -0
  26. package/dist-server/service/noti-rule/noti-rule-history.js.map +1 -0
  27. package/dist-server/service/noti-rule/noti-rule-mutation.js +168 -0
  28. package/dist-server/service/noti-rule/noti-rule-mutation.js.map +1 -0
  29. package/dist-server/service/noti-rule/noti-rule-query.js +97 -0
  30. package/dist-server/service/noti-rule/noti-rule-query.js.map +1 -0
  31. package/dist-server/service/noti-rule/noti-rule-type.js +102 -0
  32. package/dist-server/service/noti-rule/noti-rule-type.js.map +1 -0
  33. package/dist-server/service/noti-rule/noti-rule.js +146 -0
  34. package/dist-server/service/noti-rule/noti-rule.js.map +1 -0
  35. package/dist-server/service/notification-old/directive-notification.js +59 -0
  36. package/dist-server/service/notification-old/directive-notification.js.map +1 -0
  37. package/dist-server/service/notification-old/index.js +14 -0
  38. package/dist-server/service/notification-old/index.js.map +1 -0
  39. package/dist-server/service/notification-old/notification-resolver.js +45 -0
  40. package/dist-server/service/notification-old/notification-resolver.js.map +1 -0
  41. package/dist-server/service/notification-old/notification.js +49 -0
  42. package/dist-server/service/notification-old/notification.js.map +1 -0
  43. package/dist-server/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +8 -8
  45. package/server/dist-server/tsconfig.tsbuildinfo +1 -0
  46. package/dist-server/migrations/index.js +0 -12
  47. package/dist-server/migrations/index.js.map +0 -1
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.directiveNotification = exports.notificationDirectiveTypeDefs = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_1 = require("graphql");
6
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
+ const utils_1 = require("@graphql-tools/utils");
8
+ const debug = require('debug')('things-factory:notification:directive-notification');
9
+ const DIRECTIVE = 'notification';
10
+ exports.notificationDirectiveTypeDefs = (0, graphql_tag_1.default) `
11
+ directive @notification(
12
+ receivers: String
13
+ topic: String
14
+ subject: String # info
15
+ title: String
16
+ body: String
17
+ image: String
18
+ url: String
19
+ # timestamp = String(Date.now())
20
+ mode: String # background
21
+ ) on FIELD_DEFINITION
22
+ `;
23
+ const directiveNotification = (schema) => (0, utils_1.mapSchema)(schema, {
24
+ [utils_1.MapperKind.OBJECT_FIELD]: (fieldConfig, fieldName, typeName, schema) => {
25
+ var _a;
26
+ const notificationDirective = (_a = (0, utils_1.getDirective)(schema, fieldConfig, DIRECTIVE)) === null || _a === void 0 ? void 0 : _a[0];
27
+ if (notificationDirective) {
28
+ const { resolve = graphql_1.defaultFieldResolver, args } = fieldConfig;
29
+ if (!args) {
30
+ throw new Error(`Unexpected Error. args should be defined in @notification directive for field ${fieldName}.`);
31
+ }
32
+ const { receivers, topic, subject = 'info', title, body, image, url, mode = 'background' } = notificationDirective;
33
+ const timestamp = Date.now();
34
+ fieldConfig.resolve = async function (source, args, context, info) {
35
+ const result = await resolve.call(this, source, args, context, info);
36
+ const { domain, user, notify } = context.state;
37
+ if (!notify) {
38
+ debug('notify not set');
39
+ }
40
+ else {
41
+ try {
42
+ await notify({
43
+ receivers: [user.id],
44
+ notificationDirective,
45
+ timestamp: new Date()
46
+ });
47
+ }
48
+ catch (err) {
49
+ debug(err);
50
+ }
51
+ }
52
+ return result;
53
+ };
54
+ return fieldConfig;
55
+ }
56
+ }
57
+ });
58
+ exports.directiveNotification = directiveNotification;
59
+ //# sourceMappingURL=directive-notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directive-notification.js","sourceRoot":"","sources":["../../../server/service/notification-old/directive-notification.ts"],"names":[],"mappings":";;;;AAAA,qCAA6D;AAC7D,sEAA6B;AAE7B,gDAA0E;AAE1E,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,oDAAoD,CAAC,CAAA;AAEpF,MAAM,SAAS,GAAG,cAAc,CAAA;AAEnB,QAAA,6BAA6B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;CAY/C,CAAA;AACM,MAAM,qBAAqB,GAAG,CAAC,MAAqB,EAAE,EAAE,CAC7D,IAAA,iBAAS,EAAC,MAAM,EAAE;IAChB,CAAC,kBAAU,CAAC,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;;QACtE,MAAM,qBAAqB,GAAG,MAAA,IAAA,oBAAY,EAAC,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,0CAAG,CAAC,CAAC,CAAA;QAC/E,IAAI,qBAAqB,EAAE;YACzB,MAAM,EAAE,OAAO,GAAG,8BAAoB,EAAE,IAAI,EAAE,GAAG,WAAW,CAAA;YAE5D,IAAI,CAAC,IAAI,EAAE;gBACT,MAAM,IAAI,KAAK,CAAC,iFAAiF,SAAS,GAAG,CAAC,CAAA;aAC/G;YAED,MAAM,EACJ,SAAS,EACT,KAAK,EACL,OAAO,GAAG,MAAM,EAChB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,GAAG,EACH,IAAI,GAAG,YAAY,EACpB,GAAG,qBAAqB,CAAA;YACzB,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;YAE5B,WAAW,CAAC,OAAO,GAAG,KAAK,WAAW,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI;gBAC/D,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;gBAEpE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;gBAE9C,IAAI,CAAC,MAAM,EAAE;oBACX,KAAK,CAAC,gBAAgB,CAAC,CAAA;iBACxB;qBAAM;oBACL,IAAI;wBACF,MAAM,MAAM,CAAC;4BACX,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;4BACpB,qBAAqB;4BACrB,SAAS,EAAE,IAAI,IAAI,EAAE;yBACtB,CAAC,CAAA;qBACH;oBAAC,OAAO,GAAG,EAAE;wBACZ,KAAK,CAAC,GAAG,CAAC,CAAA;qBACX;iBACF;gBAED,OAAO,MAAM,CAAA;YACf,CAAC,CAAA;YAED,OAAO,WAAW,CAAA;SACnB;IACH,CAAC;CACF,CAAC,CAAA;AAhDS,QAAA,qBAAqB,yBAgD9B","sourcesContent":["import { defaultFieldResolver, GraphQLSchema } from 'graphql'\nimport gql from 'graphql-tag'\n\nimport { getDirective, MapperKind, mapSchema } from '@graphql-tools/utils'\n\nconst debug = require('debug')('things-factory:notification:directive-notification')\n\nconst DIRECTIVE = 'notification'\n\nexport const notificationDirectiveTypeDefs = gql`\n directive @notification(\n receivers: String\n topic: String\n subject: String # info\n title: String\n body: String\n image: String\n url: String\n # timestamp = String(Date.now())\n mode: String # background\n ) on FIELD_DEFINITION\n`\nexport const directiveNotification = (schema: GraphQLSchema) =>\n mapSchema(schema, {\n [MapperKind.OBJECT_FIELD]: (fieldConfig, fieldName, typeName, schema) => {\n const notificationDirective = getDirective(schema, fieldConfig, DIRECTIVE)?.[0]\n if (notificationDirective) {\n const { resolve = defaultFieldResolver, args } = fieldConfig\n\n if (!args) {\n throw new Error(`Unexpected Error. args should be defined in @notification directive for field ${fieldName}.`)\n }\n\n const {\n receivers,\n topic,\n subject = 'info',\n title,\n body,\n image,\n url,\n mode = 'background'\n } = notificationDirective\n const timestamp = Date.now()\n\n fieldConfig.resolve = async function (source, args, context, info) {\n const result = await resolve.call(this, source, args, context, info)\n\n const { domain, user, notify } = context.state\n\n if (!notify) {\n debug('notify not set')\n } else {\n try {\n await notify({\n receivers: [user.id],\n notificationDirective,\n timestamp: new Date()\n })\n } catch (err) {\n debug(err)\n }\n }\n\n return result\n }\n\n return fieldConfig\n }\n }\n })\n"]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.directives = exports.resolvers = exports.entities = exports.typeDefs = void 0;
4
+ const notification_resolver_1 = require("./notification-resolver");
5
+ const directive_notification_1 = require("./directive-notification");
6
+ exports.typeDefs = {
7
+ notificationDirectiveTypeDefs: directive_notification_1.notificationDirectiveTypeDefs
8
+ };
9
+ exports.entities = [];
10
+ exports.resolvers = [notification_resolver_1.NotificationResolver];
11
+ exports.directives = {
12
+ notification: directive_notification_1.directiveNotification
13
+ };
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/notification-old/index.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAC9D,qEAA+F;AAElF,QAAA,QAAQ,GAAG;IACtB,6BAA6B,EAA7B,sDAA6B;CAC9B,CAAA;AACY,QAAA,QAAQ,GAAG,EAAE,CAAA;AACb,QAAA,SAAS,GAAG,CAAC,4CAAoB,CAAC,CAAA;AAClC,QAAA,UAAU,GAAG;IACxB,YAAY,EAAE,8CAAqB;CACpC,CAAA","sourcesContent":["import { NotificationResolver } from './notification-resolver'\nimport { notificationDirectiveTypeDefs, directiveNotification } from './directive-notification'\n\nexport const typeDefs = {\n notificationDirectiveTypeDefs\n}\nexport const entities = []\nexport const resolvers = [NotificationResolver]\nexport const directives = {\n notification: directiveNotification\n}\n"]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationResolver = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_subscriptions_1 = require("graphql-subscriptions");
6
+ const type_graphql_1 = require("type-graphql");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const notification_1 = require("./notification");
9
+ let NotificationResolver = class NotificationResolver {
10
+ notification(payload, subject) {
11
+ return payload.notification;
12
+ }
13
+ };
14
+ tslib_1.__decorate([
15
+ (0, type_graphql_1.Subscription)({
16
+ subscribe: (0, graphql_subscriptions_1.withFilter)(() => shell_1.pubsub.asyncIterator('notification'), (payload, variables, context, info) => {
17
+ /* normally, subscription context doesn't have domain */
18
+ const { domain, user } = context.state;
19
+ const { subjects = [] } = variables;
20
+ const { notification: { subject, domain: pdomain } } = payload;
21
+ const subdomain = pdomain === null || pdomain === void 0 ? void 0 : pdomain.subdomain;
22
+ if (subdomain) {
23
+ if (domain === null || domain === void 0 ? void 0 : domain.subdomain) {
24
+ if (subdomain !== domain.subdomain) {
25
+ return false;
26
+ }
27
+ }
28
+ else if (!user.domains.find(d => d.subdomain === subdomain)) {
29
+ return false;
30
+ }
31
+ }
32
+ return !subject || subjects.indexOf(subject) !== -1;
33
+ })
34
+ }),
35
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
36
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('subjects', type => [String], { nullable: true })),
37
+ tslib_1.__metadata("design:type", Function),
38
+ tslib_1.__metadata("design:paramtypes", [Object, Array]),
39
+ tslib_1.__metadata("design:returntype", notification_1.Notification)
40
+ ], NotificationResolver.prototype, "notification", null);
41
+ NotificationResolver = tslib_1.__decorate([
42
+ (0, type_graphql_1.Resolver)()
43
+ ], NotificationResolver);
44
+ exports.NotificationResolver = NotificationResolver;
45
+ //# sourceMappingURL=notification-resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-resolver.js","sourceRoot":"","sources":["../../../server/service/notification-old/notification-resolver.ts"],"names":[],"mappings":";;;;AAAA,iEAAkD;AAClD,+CAAgE;AAEhE,iDAA8C;AAE9C,iDAA6C;AAGtC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IA6B/B,YAAY,CACF,OAAuC,EACQ,OAAiB;QAExE,OAAO,OAAO,CAAC,YAAY,CAAA;IAC7B,CAAC;CACF,CAAA;AAlCC;IAAC,IAAA,2BAAY,EAAC;QACZ,SAAS,EAAE,IAAA,kCAAU,EACnB,GAAG,EAAE,CAAC,cAAM,CAAC,aAAa,CAAC,cAAc,CAAC,EAC1C,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;YACpC,wDAAwD;YACxD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;YAEtC,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,SAAS,CAAA;YACnC,MAAM,EACJ,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,EAC3C,GAAG,OAAO,CAAA;YAEX,MAAM,SAAS,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAA;YAEpC,IAAI,SAAS,EAAE;gBACb,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,EAAE;oBACrB,IAAI,SAAS,KAAK,MAAM,CAAC,SAAS,EAAE;wBAClC,OAAO,KAAK,CAAA;qBACb;iBACF;qBAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,EAAE;oBAC7D,OAAO,KAAK,CAAA;iBACb;aACF;YAED,OAAO,CAAC,OAAO,IAAI,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;QACrD,CAAC,CACF;KACF,CAAC;IAEC,mBAAA,IAAA,mBAAI,GAAE,CAAA;IACN,mBAAA,IAAA,kBAAG,EAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;;;4CACrD,2BAAY;wDAEd;AAlCU,oBAAoB;IADhC,IAAA,uBAAQ,GAAE;GACE,oBAAoB,CAmChC;AAnCY,oDAAoB","sourcesContent":["import { withFilter } from 'graphql-subscriptions'\nimport { Arg, Resolver, Root, Subscription } from 'type-graphql'\n\nimport { pubsub } from '@things-factory/shell'\n\nimport { Notification } from './notification'\n\n@Resolver()\nexport class NotificationResolver {\n @Subscription({\n subscribe: withFilter(\n () => pubsub.asyncIterator('notification'),\n (payload, variables, context, info) => {\n /* normally, subscription context doesn't have domain */\n const { domain, user } = context.state\n\n const { subjects = [] } = variables\n const {\n notification: { subject, domain: pdomain }\n } = payload\n\n const subdomain = pdomain?.subdomain\n\n if (subdomain) {\n if (domain?.subdomain) {\n if (subdomain !== domain.subdomain) {\n return false\n }\n } else if (!user.domains.find(d => d.subdomain === subdomain)) {\n return false\n }\n }\n\n return !subject || subjects.indexOf(subject) !== -1\n }\n )\n })\n notification(\n @Root() payload: { notification: Notification },\n @Arg('subjects', type => [String], { nullable: true }) subject: string[]\n ): Notification {\n return payload.notification\n }\n}\n"]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Notification = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const shell_1 = require("@things-factory/shell");
7
+ let Notification = class Notification {
8
+ };
9
+ tslib_1.__decorate([
10
+ (0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true }),
11
+ tslib_1.__metadata("design:type", shell_1.Domain)
12
+ ], Notification.prototype, "domain", void 0);
13
+ tslib_1.__decorate([
14
+ (0, type_graphql_1.Field)({ nullable: true }),
15
+ tslib_1.__metadata("design:type", String)
16
+ ], Notification.prototype, "subject", void 0);
17
+ tslib_1.__decorate([
18
+ (0, type_graphql_1.Field)({ nullable: true }),
19
+ tslib_1.__metadata("design:type", String)
20
+ ], Notification.prototype, "type", void 0);
21
+ tslib_1.__decorate([
22
+ (0, type_graphql_1.Field)(),
23
+ tslib_1.__metadata("design:type", String)
24
+ ], Notification.prototype, "title", void 0);
25
+ tslib_1.__decorate([
26
+ (0, type_graphql_1.Field)(),
27
+ tslib_1.__metadata("design:type", String)
28
+ ], Notification.prototype, "body", void 0);
29
+ tslib_1.__decorate([
30
+ (0, type_graphql_1.Field)({ nullable: true }),
31
+ tslib_1.__metadata("design:type", String)
32
+ ], Notification.prototype, "url", void 0);
33
+ tslib_1.__decorate([
34
+ (0, type_graphql_1.Field)({ nullable: true }),
35
+ tslib_1.__metadata("design:type", String)
36
+ ], Notification.prototype, "image", void 0);
37
+ tslib_1.__decorate([
38
+ (0, type_graphql_1.Field)(type => shell_1.ScalarAny, { nullable: true }),
39
+ tslib_1.__metadata("design:type", Object)
40
+ ], Notification.prototype, "property", void 0);
41
+ tslib_1.__decorate([
42
+ (0, type_graphql_1.Field)(type => shell_1.ScalarDate, { nullable: true }),
43
+ tslib_1.__metadata("design:type", Date)
44
+ ], Notification.prototype, "timestamp", void 0);
45
+ Notification = tslib_1.__decorate([
46
+ (0, type_graphql_1.ObjectType)()
47
+ ], Notification);
48
+ exports.Notification = Notification;
49
+ //# sourceMappingURL=notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../server/service/notification-old/notification.ts"],"names":[],"mappings":";;;;AAAA,+CAAgD;AAChD,iDAAqE;AAG9D,IAAM,YAAY,GAAlB,MAAM,YAAY;CA2BxB,CAAA;AA1BC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjC,cAAM;4CAAA;AAEf;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACV;AAEhB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACb;AAEb;IAAC,IAAA,oBAAK,GAAE;;2CACK;AAEb;IAAC,IAAA,oBAAK,GAAE;;0CACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACf;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAChC;AAEb;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACnC,IAAI;+CAAA;AA1BJ,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CA2BxB;AA3BY,oCAAY","sourcesContent":["import { ObjectType, Field } from 'type-graphql'\nimport { Domain, ScalarAny, ScalarDate } from '@things-factory/shell'\n\n@ObjectType()\nexport class Notification {\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @Field({ nullable: true })\n subject?: string\n\n @Field({ nullable: true })\n type?: string\n\n @Field()\n title: string\n\n @Field()\n body: string\n\n @Field({ nullable: true })\n url: string\n\n @Field({ nullable: true })\n image: string\n\n @Field(type => ScalarAny, { nullable: true })\n property: any\n\n @Field(type => ScalarDate, { nullable: true })\n timestamp: Date\n}\n"]}