@things-factory/shell 9.0.0-beta.8 → 9.0.5

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 (91) hide show
  1. package/_index.html +0 -1
  2. package/client/themes/app-theme.css +4 -0
  3. package/config/config.development.js +1 -1
  4. package/config/config.production.js +1 -14
  5. package/dist-server/graphql-local-client.js +4 -1
  6. package/dist-server/graphql-local-client.js.map +1 -1
  7. package/dist-server/initializers/database.js +8 -2
  8. package/dist-server/initializers/database.js.map +1 -1
  9. package/dist-server/middlewares/domain-middleware.js +3 -3
  10. package/dist-server/middlewares/domain-middleware.js.map +1 -1
  11. package/dist-server/middlewares/index.js +2 -2
  12. package/dist-server/middlewares/index.js.map +1 -1
  13. package/dist-server/migrations/1000000000000-SeedDomain.js +3 -1
  14. package/dist-server/migrations/1000000000000-SeedDomain.js.map +1 -1
  15. package/dist-server/pubsub-log-transport.js +4 -1
  16. package/dist-server/pubsub-log-transport.js.map +1 -1
  17. package/dist-server/pubsub.js +7 -3
  18. package/dist-server/pubsub.js.map +1 -1
  19. package/dist-server/schema.js +24 -5
  20. package/dist-server/schema.js.map +1 -1
  21. package/dist-server/server-dev.js +5 -3
  22. package/dist-server/server-dev.js.map +1 -1
  23. package/dist-server/server.js +6 -4
  24. package/dist-server/server.js.map +1 -1
  25. package/dist-server/service/attribute-set/attribute-set-item-type.d.ts +2 -2
  26. package/dist-server/service/attribute-set/attribute-set-item-type.js +37 -23
  27. package/dist-server/service/attribute-set/attribute-set-item-type.js.map +1 -1
  28. package/dist-server/service/attribute-set/attribute-set-mutation.js +43 -19
  29. package/dist-server/service/attribute-set/attribute-set-mutation.js.map +1 -1
  30. package/dist-server/service/attribute-set/attribute-set-query.js +13 -5
  31. package/dist-server/service/attribute-set/attribute-set-query.js.map +1 -1
  32. package/dist-server/service/attribute-set/attribute-set-type.js +22 -14
  33. package/dist-server/service/attribute-set/attribute-set-type.js.map +1 -1
  34. package/dist-server/service/attribute-set/attribute-set.js +12 -7
  35. package/dist-server/service/attribute-set/attribute-set.js.map +1 -1
  36. package/dist-server/service/common-types/index.js +2 -0
  37. package/dist-server/service/common-types/index.js.map +1 -1
  38. package/dist-server/service/common-types/list-param.js +17 -16
  39. package/dist-server/service/common-types/list-param.js.map +1 -1
  40. package/dist-server/service/common-types/log.js +5 -5
  41. package/dist-server/service/common-types/log.js.map +1 -1
  42. package/dist-server/service/common-types/object-ref.js +6 -4
  43. package/dist-server/service/common-types/object-ref.js.map +1 -1
  44. package/dist-server/service/common-types/scalar-any.js +1 -1
  45. package/dist-server/service/common-types/scalar-any.js.map +1 -1
  46. package/dist-server/service/common-types/scalar-date.js +1 -1
  47. package/dist-server/service/common-types/scalar-date.js.map +1 -1
  48. package/dist-server/service/common-types/scalar-object.js +1 -1
  49. package/dist-server/service/common-types/scalar-object.js.map +1 -1
  50. package/dist-server/service/directive-transaction/transaction.js +5 -3
  51. package/dist-server/service/directive-transaction/transaction.js.map +1 -1
  52. package/dist-server/service/domain/domain-mutation.js +22 -9
  53. package/dist-server/service/domain/domain-mutation.js.map +1 -1
  54. package/dist-server/service/domain/domain-query.d.ts +1 -0
  55. package/dist-server/service/domain/domain-query.js +25 -4
  56. package/dist-server/service/domain/domain-query.js.map +1 -1
  57. package/dist-server/service/domain/domain-types.d.ts +2 -0
  58. package/dist-server/service/domain/domain-types.js +36 -17
  59. package/dist-server/service/domain/domain-types.js.map +1 -1
  60. package/dist-server/service/domain/domain.js +29 -55
  61. package/dist-server/service/domain/domain.js.map +1 -1
  62. package/dist-server/service/subscription-data/data-resolver.js +5 -5
  63. package/dist-server/service/subscription-data/data-resolver.js.map +1 -1
  64. package/dist-server/service/subscription-data/data-types.js +9 -4
  65. package/dist-server/service/subscription-data/data-types.js.map +1 -1
  66. package/dist-server/service/subscription-data/index.js +3 -0
  67. package/dist-server/service/subscription-data/index.js.map +1 -1
  68. package/dist-server/tsconfig.tsbuildinfo +1 -1
  69. package/dist-server/utils/get-domain.d.ts +9 -10
  70. package/dist-server/utils/get-domain.js +65 -72
  71. package/dist-server/utils/get-domain.js.map +1 -1
  72. package/dist-server/utils/get-query-builder-from-list-params.js +4 -5
  73. package/dist-server/utils/get-query-builder-from-list-params.js.map +1 -1
  74. package/dist-server/utils/get-times-for-period.d.ts +24 -4
  75. package/dist-server/utils/get-times-for-period.js +42 -5
  76. package/dist-server/utils/get-times-for-period.js.map +1 -1
  77. package/dist-server/utils/list-params-converter.js +9 -6
  78. package/dist-server/utils/list-params-converter.js.map +1 -1
  79. package/dist-server/utils/list-query-builder.js +8 -9
  80. package/dist-server/utils/list-query-builder.js.map +1 -1
  81. package/package.json +14 -16
  82. package/translations/en.json +2 -0
  83. package/translations/ja.json +2 -0
  84. package/translations/ko.json +3 -1
  85. package/translations/ms.json +2 -0
  86. package/translations/zh.json +2 -0
  87. package/views/public/home.html +0 -1
  88. package/client/scene/scene-components.js +0 -3
  89. package/client/scene/scene-player.js +0 -103
  90. package/client/scene/scene-viewer.js +0 -106
  91. package/client/scene/things-scene-components.import +0 -1
@@ -3,6 +3,7 @@ import { ObjectRef } from '../common-types/index.js';
3
3
  export declare class DomainInput {
4
4
  name: string;
5
5
  description?: string;
6
+ extType?: string;
6
7
  }
7
8
  export declare class DomainPatch {
8
9
  id?: string;
@@ -16,6 +17,7 @@ export declare class DomainPatch {
16
17
  brandName?: string;
17
18
  brandImage?: string;
18
19
  contentImage?: string;
20
+ extType?: string;
19
21
  attributes?: any;
20
22
  theme?: string;
21
23
  }
@@ -9,73 +9,92 @@ let DomainInput = class DomainInput {
9
9
  };
10
10
  exports.DomainInput = DomainInput;
11
11
  tslib_1.__decorate([
12
- (0, type_graphql_1.Field)(),
12
+ (0, type_graphql_1.Field)({ description: 'The name of the domain.' }),
13
13
  tslib_1.__metadata("design:type", String)
14
14
  ], DomainInput.prototype, "name", void 0);
15
15
  tslib_1.__decorate([
16
- (0, type_graphql_1.Field)({ nullable: true }),
16
+ (0, type_graphql_1.Field)({ nullable: true, description: 'A description of the domain.' }),
17
17
  tslib_1.__metadata("design:type", String)
18
18
  ], DomainInput.prototype, "description", void 0);
19
+ tslib_1.__decorate([
20
+ (0, type_graphql_1.Field)({
21
+ nullable: true,
22
+ description: "The 'extType' field stands for 'extended entity type' and specifies the business or organizational category this domain represents, such as company, department, factory, or project."
23
+ }),
24
+ tslib_1.__metadata("design:type", String)
25
+ ], DomainInput.prototype, "extType", void 0);
19
26
  exports.DomainInput = DomainInput = tslib_1.__decorate([
20
- (0, type_graphql_1.InputType)()
27
+ (0, type_graphql_1.InputType)({
28
+ description: 'Input type for creating a new domain entity, including name, description, and extended entity type.'
29
+ })
21
30
  ], DomainInput);
22
31
  let DomainPatch = class DomainPatch {
23
32
  };
24
33
  exports.DomainPatch = DomainPatch;
25
34
  tslib_1.__decorate([
26
- (0, type_graphql_1.Field)({ nullable: true }),
35
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The unique identifier of the domain.' }),
27
36
  tslib_1.__metadata("design:type", String)
28
37
  ], DomainPatch.prototype, "id", void 0);
29
38
  tslib_1.__decorate([
30
- (0, type_graphql_1.Field)({ nullable: true }),
39
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The name of the domain.' }),
31
40
  tslib_1.__metadata("design:type", String)
32
41
  ], DomainPatch.prototype, "name", void 0);
33
42
  tslib_1.__decorate([
34
- (0, type_graphql_1.Field)({ nullable: true }),
43
+ (0, type_graphql_1.Field)({ nullable: true, description: 'A description of the domain.' }),
35
44
  tslib_1.__metadata("design:type", String)
36
45
  ], DomainPatch.prototype, "description", void 0);
37
46
  tslib_1.__decorate([
38
- (0, type_graphql_1.Field)({ nullable: true }),
47
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The timezone setting for the domain.' }),
39
48
  tslib_1.__metadata("design:type", String)
40
49
  ], DomainPatch.prototype, "timezone", void 0);
41
50
  tslib_1.__decorate([
42
- (0, type_graphql_1.Field)({ nullable: true }),
51
+ (0, type_graphql_1.Field)({ nullable: true, description: 'A flag indicating if the domain is a system domain.' }),
43
52
  tslib_1.__metadata("design:type", Boolean)
44
53
  ], DomainPatch.prototype, "systemFlag", void 0);
45
54
  tslib_1.__decorate([
46
- (0, type_graphql_1.Field)({ nullable: true }),
55
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The subdomain associated with the domain.' }),
47
56
  tslib_1.__metadata("design:type", String)
48
57
  ], DomainPatch.prototype, "subdomain", void 0);
49
58
  tslib_1.__decorate([
50
- (0, type_graphql_1.Field)({ nullable: true }),
59
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The unique identifier of the domain owner.' }),
51
60
  tslib_1.__metadata("design:type", String)
52
61
  ], DomainPatch.prototype, "owner", void 0);
53
62
  tslib_1.__decorate([
54
- (0, type_graphql_1.Field)(type => index_js_1.ObjectRef, { nullable: true }),
63
+ (0, type_graphql_1.Field)(type => index_js_1.ObjectRef, { nullable: true, description: 'A reference to the parent domain, if any.' }),
55
64
  tslib_1.__metadata("design:type", index_js_1.ObjectRef)
56
65
  ], DomainPatch.prototype, "parent", void 0);
57
66
  tslib_1.__decorate([
58
- (0, type_graphql_1.Field)({ nullable: true }),
67
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The brand name associated with the domain.' }),
59
68
  tslib_1.__metadata("design:type", String)
60
69
  ], DomainPatch.prototype, "brandName", void 0);
61
70
  tslib_1.__decorate([
62
- (0, type_graphql_1.Field)({ nullable: true }),
71
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The brand image URL for the domain.' }),
63
72
  tslib_1.__metadata("design:type", String)
64
73
  ], DomainPatch.prototype, "brandImage", void 0);
65
74
  tslib_1.__decorate([
66
- (0, type_graphql_1.Field)({ nullable: true }),
75
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The content image URL for the domain.' }),
67
76
  tslib_1.__metadata("design:type", String)
68
77
  ], DomainPatch.prototype, "contentImage", void 0);
69
78
  tslib_1.__decorate([
70
- (0, type_graphql_1.Field)(type => index_js_1.ScalarObject, { nullable: true }),
79
+ (0, type_graphql_1.Field)({
80
+ nullable: true,
81
+ description: "The 'extType' field stands for 'extended entity type' and specifies the business or organizational category this domain represents, such as company, department, factory, or project."
82
+ }),
83
+ tslib_1.__metadata("design:type", String)
84
+ ], DomainPatch.prototype, "extType", void 0);
85
+ tslib_1.__decorate([
86
+ (0, type_graphql_1.Field)(type => index_js_1.ScalarObject, {
87
+ nullable: true,
88
+ description: 'Additional attributes for the domain in key-value pairs.'
89
+ }),
71
90
  tslib_1.__metadata("design:type", Object)
72
91
  ], DomainPatch.prototype, "attributes", void 0);
73
92
  tslib_1.__decorate([
74
- (0, type_graphql_1.Field)({ nullable: true }),
93
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The theme associated with the domain.' }),
75
94
  tslib_1.__metadata("design:type", String)
76
95
  ], DomainPatch.prototype, "theme", void 0);
77
96
  exports.DomainPatch = DomainPatch = tslib_1.__decorate([
78
- (0, type_graphql_1.InputType)()
97
+ (0, type_graphql_1.InputType)({ description: 'Input type for updating an existing domain entity.' })
79
98
  ], DomainPatch);
80
99
  let DomainList = class DomainList {
81
100
  };
@@ -1 +1 @@
1
- {"version":3,"file":"domain-types.js","sourceRoot":"","sources":["../../../server/service/domain/domain-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,2CAA4C;AAC5C,uDAAkE;AAG3D,IAAM,WAAW,GAAjB,MAAM,WAAW;CAMvB,CAAA;AANY,kCAAW;AAEtB;IADC,IAAA,oBAAK,GAAE;;yCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;sBALT,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CAMvB;AAGM,IAAM,WAAW,GAAjB,MAAM,WAAW;CAuCvB,CAAA;AAvCY,kCAAW;AAEtB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,I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EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1B;qBALF,UAAU;IADtB,IAAA,yBAAU,GAAE;GACA,UAAU,CAMtB","sourcesContent":["import { ObjectType, InputType, Field, Int } from 'type-graphql'\nimport { Domain, IPList } from './domain.js'\nimport { ObjectRef, ScalarObject } from '../common-types/index.js'\n\n@InputType()\nexport class DomainInput {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@InputType()\nexport class DomainPatch {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n timezone?: string\n\n @Field({ nullable: true })\n systemFlag?: Boolean\n\n @Field({ nullable: true })\n subdomain?: string\n\n @Field({ nullable: true })\n owner?: string\n\n @Field(type => ObjectRef, { nullable: true })\n parent?: ObjectRef\n\n @Field({ nullable: true })\n brandName?: string\n\n @Field({ nullable: true })\n brandImage?: string\n\n @Field({ nullable: true })\n contentImage?: string\n\n @Field(type => ScalarObject, { nullable: true })\n attributes?: any\n\n @Field({ nullable: true })\n theme?: string\n}\n\n@ObjectType()\nexport class DomainList {\n @Field(type => [Domain], { nullable: true })\n items: Domain[]\n\n @Field(type => Int, { nullable: true })\n total: number\n}\n"]}
1
+ {"version":3,"file":"domain-types.js","sourceRoot":"","sources":["../../../server/service/domain/domain-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,2CAA4C;AAC5C,uDAAkE;AAK3D,IAAM,WAAW,GAAjB,MAAM,WAAW;CAavB,CAAA;AAbY,kCAAW;AAEtB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;;yCACtC;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;;gDACnD;AAOpB;IALC,IAAA,oBAAK,EAAC;QAC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AAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;;+CAC3D;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;;iDAC3D;AAOrB;IALC,IAAA,oBAAK,EAAC;QACL,QAAQ,EAAE,IAAI;QACd,WAAW,EACT,uLAAuL;KAC1L,CAAC;;4CACc;AAMhB;IAJC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,uBAAY,EAAE;QAC3B,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,0DAA0D;KACxE,CAAC;;+CACc;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;;0CAClE;sBAhDH,WAAW;IADvB,IAAA,wBAAS,EAAC,EAAE,WAAW,EAAE,oDAAoD,EAAE,CAAC;GACpE,WAAW,CAiDvB;AAGM,IAAM,UAAU,GAAhB,MAAM,UAAU;CAMtB,CAAA;AANY,gCAAU;AAErB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,kBAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC7B;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1B;qBALF,UAAU;IADtB,IAAA,yBAAU,GAAE;GACA,UAAU,CAMtB","sourcesContent":["import { ObjectType, InputType, Field, Int } from 'type-graphql'\nimport { Domain, IPList } from './domain.js'\nimport { ObjectRef, ScalarObject } from '../common-types/index.js'\n\n@InputType({\n description: 'Input type for creating a new domain entity, including name, description, and extended entity type.'\n})\nexport class DomainInput {\n @Field({ description: 'The name of the domain.' })\n name: string\n\n @Field({ nullable: true, description: 'A description of the domain.' })\n description?: string\n\n @Field({\n nullable: true,\n description:\n \"The 'extType' field stands for 'extended entity type' and specifies the business or organizational category this domain represents, such as company, department, factory, or project.\"\n })\n extType?: string\n}\n\n@InputType({ description: 'Input type for updating an existing domain entity.' })\nexport class DomainPatch {\n @Field({ nullable: true, description: 'The unique identifier of the domain.' })\n id?: string\n\n @Field({ nullable: true, description: 'The name of the domain.' })\n name?: string\n\n @Field({ nullable: true, description: 'A description of the domain.' })\n description?: string\n\n @Field({ nullable: true, description: 'The timezone setting for the domain.' })\n timezone?: string\n\n @Field({ nullable: true, description: 'A flag indicating if the domain is a system domain.' })\n systemFlag?: Boolean\n\n @Field({ nullable: true, description: 'The subdomain associated with the domain.' })\n subdomain?: string\n\n @Field({ nullable: true, description: 'The unique identifier of the domain owner.' })\n owner?: string\n\n @Field(type => ObjectRef, { nullable: true, description: 'A reference to the parent domain, if any.' })\n parent?: ObjectRef\n\n @Field({ nullable: true, description: 'The brand name associated with the domain.' })\n brandName?: string\n\n @Field({ nullable: true, description: 'The brand image URL for the domain.' })\n brandImage?: string\n\n @Field({ nullable: true, description: 'The content image URL for the domain.' })\n contentImage?: string\n\n @Field({\n nullable: true,\n description:\n \"The 'extType' field stands for 'extended entity type' and specifies the business or organizational category this domain represents, such as company, department, factory, or project.\"\n })\n extType?: string\n\n @Field(type => ScalarObject, {\n nullable: true,\n description: 'Additional attributes for the domain in key-value pairs.'\n })\n attributes?: any\n\n @Field({ nullable: true, description: 'The theme associated with the domain.' })\n theme?: string\n}\n\n@ObjectType()\nexport class DomainList {\n @Field(type => [Domain], { nullable: true })\n items: Domain[]\n\n @Field(type => Int, { nullable: true })\n total: number\n}\n"]}
@@ -4,82 +4,51 @@ exports.Domain = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const typeorm_1 = require("typeorm");
6
6
  const type_graphql_1 = require("type-graphql");
7
- const env_1 = require("@things-factory/env");
8
7
  const scalar_object_js_1 = require("../common-types/scalar-object.js");
9
- const numericTypes = ['int', 'int2', 'int4', 'int8', 'integer', 'tinyint', 'smallint', 'mediumint', 'bigint'];
10
- const generatedStrategy = ['uuid', 'rowid', 'increment', 'identity'];
11
- const domainPrimaryOption = env_1.config.get('domainPrimaryOption');
12
- const domainPrimaryType = domainPrimaryOption === null || domainPrimaryOption === void 0 ? void 0 : domainPrimaryOption.type;
13
- const domainPrimaryStrategy = domainPrimaryOption === null || domainPrimaryOption === void 0 ? void 0 : domainPrimaryOption.strategy;
14
8
  let Domain = class Domain {
15
9
  };
16
10
  exports.Domain = Domain;
17
11
  tslib_1.__decorate([
18
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
19
- (0, typeorm_1.Column)(domainPrimaryOption
20
- ? {
21
- type: domainPrimaryType,
22
- primary: true,
23
- transformer: {
24
- //from(value: DatabaseType): EntityType
25
- from: value => {
26
- return value;
27
- },
28
- //to(value: EntityType): DatabaseType
29
- to: value => {
30
- if (!value) {
31
- value = 0;
32
- }
33
- if (numericTypes.indexOf(domainPrimaryType) >= 0) {
34
- return parseInt(value);
35
- }
36
- else {
37
- return value;
38
- }
39
- }
40
- },
41
- generated: generatedStrategy.indexOf(domainPrimaryStrategy) >= 0 ? domainPrimaryStrategy : false
42
- }
43
- : {
44
- type: 'uuid',
45
- primary: true,
46
- generated: 'uuid'
47
- }),
12
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
13
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'The unique identifier of the domain.' }),
48
14
  tslib_1.__metadata("design:type", String)
49
15
  ], Domain.prototype, "id", void 0);
50
16
  tslib_1.__decorate([
51
- (0, type_graphql_1.Field)(),
17
+ (0, type_graphql_1.Field)({ description: 'The name of the domain.' }),
52
18
  (0, typeorm_1.Column)({ unique: true }),
53
19
  tslib_1.__metadata("design:type", String)
54
20
  ], Domain.prototype, "name", void 0);
55
21
  tslib_1.__decorate([
56
- (0, type_graphql_1.Field)({ nullable: true }),
22
+ (0, type_graphql_1.Field)({ nullable: true, description: 'A description of the domain.' }),
57
23
  (0, typeorm_1.Column)({ nullable: true }),
58
24
  tslib_1.__metadata("design:type", String)
59
25
  ], Domain.prototype, "description", void 0);
60
26
  tslib_1.__decorate([
61
- (0, type_graphql_1.Field)({ nullable: true }),
27
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The external type of the domain, if applicable.' }),
62
28
  (0, typeorm_1.Column)({ nullable: true }),
63
29
  tslib_1.__metadata("design:type", String)
64
30
  ], Domain.prototype, "extType", void 0);
65
31
  tslib_1.__decorate([
66
- (0, type_graphql_1.Field)({ nullable: true }),
32
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The timezone of the domain, if applicable.' }),
67
33
  (0, typeorm_1.Column)({ nullable: true }),
68
34
  tslib_1.__metadata("design:type", String)
69
35
  ], Domain.prototype, "timezone", void 0);
70
36
  tslib_1.__decorate([
71
37
  (0, type_graphql_1.Directive)('@deprecated(reason: "Use `parent`")'),
72
- (0, type_graphql_1.Field)({ nullable: true }),
38
+ (0, type_graphql_1.Field)({
39
+ nullable: true,
40
+ description: 'A flag indicating if the domain is a system domain. Deprecated, use `parent` instead.'
41
+ }),
73
42
  (0, typeorm_1.Column)({ default: false }),
74
43
  tslib_1.__metadata("design:type", Boolean)
75
44
  ], Domain.prototype, "systemFlag", void 0);
76
45
  tslib_1.__decorate([
77
- (0, type_graphql_1.Field)({ nullable: true }),
46
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The subdomain of the domain, if applicable.' }),
78
47
  (0, typeorm_1.Column)({ nullable: true }),
79
48
  tslib_1.__metadata("design:type", String)
80
49
  ], Domain.prototype, "subdomain", void 0);
81
50
  tslib_1.__decorate([
82
- (0, type_graphql_1.Field)({ nullable: true }),
51
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The parent domain, if this domain is a subdomain.' }),
83
52
  (0, typeorm_1.ManyToOne)(type => Domain, { nullable: true }),
84
53
  tslib_1.__metadata("design:type", Domain)
85
54
  ], Domain.prototype, "parent", void 0);
@@ -89,57 +58,60 @@ tslib_1.__decorate([
89
58
  ], Domain.prototype, "parentId", void 0);
90
59
  tslib_1.__decorate([
91
60
  (0, typeorm_1.OneToMany)(type => Domain, domain => domain.parent),
92
- (0, type_graphql_1.Field)(type => Domain, { nullable: true }),
61
+ (0, type_graphql_1.Field)(type => Domain, { nullable: true, description: 'The child domains, if any, under this domain.' }),
93
62
  tslib_1.__metadata("design:type", Array)
94
63
  ], Domain.prototype, "children", void 0);
95
64
  tslib_1.__decorate([
96
- (0, type_graphql_1.Field)({ nullable: true }),
65
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The brand name associated with the domain, if any.' }),
97
66
  (0, typeorm_1.Column)({ nullable: true }),
98
67
  tslib_1.__metadata("design:type", String)
99
68
  ], Domain.prototype, "brandName", void 0);
100
69
  tslib_1.__decorate([
101
- (0, type_graphql_1.Field)({ nullable: true }),
70
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The brand image URL associated with the domain, if any.' }),
102
71
  (0, typeorm_1.Column)({ nullable: true }),
103
72
  tslib_1.__metadata("design:type", String)
104
73
  ], Domain.prototype, "brandImage", void 0);
105
74
  tslib_1.__decorate([
106
- (0, type_graphql_1.Field)({ nullable: true }),
75
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The content image URL associated with the domain, if any.' }),
107
76
  (0, typeorm_1.Column)({ nullable: true }),
108
77
  tslib_1.__metadata("design:type", String)
109
78
  ], Domain.prototype, "contentImage", void 0);
110
79
  tslib_1.__decorate([
111
- (0, type_graphql_1.Field)({ nullable: true }),
80
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The owner of the domain, if applicable.' }),
112
81
  (0, typeorm_1.Column)({ nullable: true }),
113
82
  tslib_1.__metadata("design:type", String)
114
83
  ], Domain.prototype, "owner", void 0);
115
84
  tslib_1.__decorate([
116
- (0, type_graphql_1.Field)({ nullable: true }),
85
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The theme associated with the domain, if any.' }),
117
86
  (0, typeorm_1.Column)({ nullable: true }),
118
87
  tslib_1.__metadata("design:type", String)
119
88
  ], Domain.prototype, "theme", void 0);
120
89
  tslib_1.__decorate([
121
90
  (0, typeorm_1.Column)('simple-json', { nullable: true }),
122
- (0, type_graphql_1.Field)(type => scalar_object_js_1.ScalarObject, { nullable: true }),
91
+ (0, type_graphql_1.Field)(type => scalar_object_js_1.ScalarObject, {
92
+ nullable: true,
93
+ description: 'A list of IPs and their associated access levels for the domain.'
94
+ }),
123
95
  tslib_1.__metadata("design:type", Object)
124
96
  ], Domain.prototype, "iplist", void 0);
125
97
  tslib_1.__decorate([
126
98
  (0, typeorm_1.Column)('simple-json', { nullable: true }),
127
- (0, type_graphql_1.Field)(type => scalar_object_js_1.ScalarObject, { nullable: true }),
99
+ (0, type_graphql_1.Field)(type => scalar_object_js_1.ScalarObject, { nullable: true, description: 'Additional attributes associated with the domain.' }),
128
100
  tslib_1.__metadata("design:type", Object)
129
101
  ], Domain.prototype, "attributes", void 0);
130
102
  tslib_1.__decorate([
131
- (0, type_graphql_1.Field)({ nullable: true }),
103
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when the domain was created.' }),
132
104
  (0, typeorm_1.CreateDateColumn)(),
133
105
  tslib_1.__metadata("design:type", Date)
134
106
  ], Domain.prototype, "createdAt", void 0);
135
107
  tslib_1.__decorate([
136
- (0, type_graphql_1.Field)({ nullable: true }),
108
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when the domain was last updated.' }),
137
109
  (0, typeorm_1.UpdateDateColumn)(),
138
110
  tslib_1.__metadata("design:type", Date)
139
111
  ], Domain.prototype, "updatedAt", void 0);
140
112
  tslib_1.__decorate([
141
113
  (0, typeorm_1.DeleteDateColumn)(),
142
- (0, type_graphql_1.Field)({ nullable: true }),
114
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when the domain was deleted, if applicable.' }),
143
115
  tslib_1.__metadata("design:type", Date)
144
116
  ], Domain.prototype, "deletedAt", void 0);
145
117
  exports.Domain = Domain = tslib_1.__decorate([
@@ -148,6 +120,8 @@ exports.Domain = Domain = tslib_1.__decorate([
148
120
  unique: true,
149
121
  where: '"deleted_at" IS NULL'
150
122
  }),
151
- (0, type_graphql_1.ObjectType)()
123
+ (0, type_graphql_1.ObjectType)({
124
+ description: 'Represents a domain entity, which is a logical grouping of users, roles, and resources within the system.'
125
+ })
152
126
  ], Domain);
153
127
  //# sourceMappingURL=domain.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"domain.js","sourceRoot":"","sources":["../../../server/service/domain/domain.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAA+D;AAC/D,6CAA4C;AAC5C,uEAA+D;AAE/D,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAA;AAC7G,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAA;AACpE,MAAM,mBAAmB,GAAG,YAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;AAC7D,MAAM,iBAAiB,GAAG,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,IAAI,CAAA;AACnD,MAAM,qBAAqB,GAAG,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,QAAQ,CAAA;AAkBpD,IAAM,MAAM,GAAZ,MAAM,MAAM;CA6GlB,CAAA;AA7GY,wBAAM;AAgCR;IA/BR,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;IACjB,IAAA,gBAAM,EACL,mBAAmB;QACjB,CAAC,CAAC;YACE,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE;gBACX,uCAAuC;gBACvC,IAAI,EAAE,KAAK,CAAC,EAAE;oBACZ,OAAO,KAAK,CAAA;gBACd,CAAC;gBACD,qCAAqC;gBAC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jectType, Directive, Field, ID } from 'type-graphql'\nimport { config } from '@things-factory/env'\nimport { ScalarObject } from '../common-types/scalar-object.js'\n\nconst numericTypes = ['int', 'int2', 'int4', 'int8', 'integer', 'tinyint', 'smallint', 'mediumint', 'bigint']\nconst generatedStrategy = ['uuid', 'rowid', 'increment', 'identity']\nconst domainPrimaryOption = config.get('domainPrimaryOption')\nconst domainPrimaryType = domainPrimaryOption?.type\nconst domainPrimaryStrategy = domainPrimaryOption?.strategy\n\nexport type IPList = {\n whitelist?: string[]\n blacklist?: string[]\n protectedlist?: string[]\n privileges?: {\n category: string\n privilege: string\n }[]\n}\n\n@Entity()\n@Index('ix_domain_0', (domain: Domain) => [domain.subdomain, domain.deletedAt], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType()\nexport class Domain {\n @Field(type => ID)\n @Column(\n domainPrimaryOption\n ? {\n type: domainPrimaryType,\n primary: true,\n transformer: {\n //from(value: DatabaseType): EntityType\n from: value => {\n return value\n },\n //to(value: EntityType): DatabaseType\n to: value => {\n if (!value) {\n value = 0\n }\n if (numericTypes.indexOf(domainPrimaryType) >= 0) {\n return parseInt(value)\n } else {\n return value\n }\n }\n },\n generated: generatedStrategy.indexOf(domainPrimaryStrategy) >= 0 ? domainPrimaryStrategy : false\n }\n : {\n type: 'uuid',\n primary: true,\n generated: 'uuid'\n }\n )\n readonly id: string\n\n @Field()\n @Column({ unique: true })\n name: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n description: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n extType: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n timezone: string\n\n @Directive('@deprecated(reason: \"Use `parent`\")')\n @Field({ nullable: true })\n @Column({ default: false })\n systemFlag: boolean\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n subdomain: string\n\n @Field({ nullable: true })\n @ManyToOne(type => Domain, { nullable: true })\n parent: Domain\n\n @RelationId((domain: Domain) => domain.parent)\n parentId?: string\n\n @OneToMany(type => Domain, domain => domain.parent)\n @Field(type => Domain, { nullable: true })\n children: Domain[]\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n brandName: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n brandImage: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n contentImage: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n owner: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n theme: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true })\n iplist?: IPList\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true })\n attributes?: any\n\n @Field({ nullable: true })\n @CreateDateColumn()\n createdAt: Date\n\n @Field({ nullable: true })\n @UpdateDateColumn()\n updatedAt: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n}\n"]}
1
+ {"version":3,"file":"domain.js","sourceRoot":"","sources":["../../../server/service/domain/domain.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA+D;AAC/D,uEAA+D;AAqBxD,IAAM,MAAM,GAAZ,MAAM,MAAM;CAsFlB,CAAA;AAtFY,wBAAM;AAGR;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;;kCACxD;AAInB;IAFC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACjD,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;oCACb;AAIZ;IAFC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IACtE,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACR;AAInB;IAFC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE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;AAIhB;IAFC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gDAAgD,EAAE,CAAC;IACxF,IAAA,0BAAgB,GAAE;sCACR,IAAI;yCAAA;AAIf;IAFC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qDAAqD,EAAE,CAAC;IAC7F,IAAA,0BAAgB,GAAE;sCACR,IAAI;yCAAA;AAIf;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,+DAA+D,EAAE,CAAC;sCAC5F,IAAI;yCAAA;iBArFL,MAAM;IATlB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,aAAa,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE;QAC9E,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,yBAAU,EAAC;QACV,WAAW,EACT,2GAA2G;KAC9G,CAAC;GACW,MAAM,CAsFlB","sourcesContent":["import {\n Column,\n CreateDateColumn,\n ManyToOne,\n OneToMany,\n RelationId,\n Entity,\n Index,\n UpdateDateColumn,\n DeleteDateColumn,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Directive, Field, ID } from 'type-graphql'\nimport { ScalarObject } from '../common-types/scalar-object.js'\n\nexport type IPList = {\n whitelist?: string[]\n blacklist?: string[]\n protectedlist?: string[]\n privileges?: {\n category: string\n privilege: string\n }[]\n}\n\n@Entity()\n@Index('ix_domain_0', (domain: Domain) => [domain.subdomain, domain.deletedAt], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType({\n description:\n 'Represents a domain entity, which is a logical grouping of users, roles, and resources within the system.'\n})\nexport class Domain {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'The unique identifier of the domain.' })\n readonly id: string\n\n @Field({ description: 'The name of the domain.' })\n @Column({ unique: true })\n name: string\n\n @Field({ nullable: true, description: 'A description of the domain.' })\n @Column({ nullable: true })\n description: string\n\n @Field({ nullable: true, description: 'The external type of the domain, if applicable.' })\n @Column({ nullable: true })\n extType: string\n\n @Field({ nullable: true, description: 'The timezone of the domain, if applicable.' })\n @Column({ nullable: true })\n timezone: string\n\n @Directive('@deprecated(reason: \"Use `parent`\")')\n @Field({\n nullable: true,\n description: 'A flag indicating if the domain is a system domain. Deprecated, use `parent` instead.'\n })\n @Column({ default: false })\n systemFlag: boolean\n\n @Field({ nullable: true, description: 'The subdomain of the domain, if applicable.' })\n @Column({ nullable: true })\n subdomain: string\n\n @Field({ nullable: true, description: 'The parent domain, if this domain is a subdomain.' })\n @ManyToOne(type => Domain, { nullable: true })\n parent: Domain\n\n @RelationId((domain: Domain) => domain.parent)\n parentId?: string\n\n @OneToMany(type => Domain, domain => domain.parent)\n @Field(type => Domain, { nullable: true, description: 'The child domains, if any, under this domain.' })\n children: Domain[]\n\n @Field({ nullable: true, description: 'The brand name associated with the domain, if any.' })\n @Column({ nullable: true })\n brandName: string\n\n @Field({ nullable: true, description: 'The brand image URL associated with the domain, if any.' })\n @Column({ nullable: true })\n brandImage: string\n\n @Field({ nullable: true, description: 'The content image URL associated with the domain, if any.' })\n @Column({ nullable: true })\n contentImage: string\n\n @Field({ nullable: true, description: 'The owner of the domain, if applicable.' })\n @Column({ nullable: true })\n owner: string\n\n @Field({ nullable: true, description: 'The theme associated with the domain, if any.' })\n @Column({ nullable: true })\n theme: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, {\n nullable: true,\n description: 'A list of IPs and their associated access levels for the domain.'\n })\n iplist?: IPList\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true, description: 'Additional attributes associated with the domain.' })\n attributes?: any\n\n @Field({ nullable: true, description: 'The date and time when the domain was created.' })\n @CreateDateColumn()\n createdAt: Date\n\n @Field({ nullable: true, description: 'The date and time when the domain was last updated.' })\n @UpdateDateColumn()\n updatedAt: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'The date and time when the domain was deleted, if applicable.' })\n deletedAt?: Date\n}\n"]}
@@ -15,26 +15,26 @@ let DataResolver = class DataResolver {
15
15
  exports.DataResolver = DataResolver;
16
16
  tslib_1.__decorate([
17
17
  (0, type_graphql_1.Subscription)({
18
+ description: 'Subscribes to real-time data updates for a specific tag within the current domain. Only users belonging to the domain or superusers are allowed to subscribe.',
18
19
  subscribe: ({ args, context, info }) => {
19
- var _a;
20
20
  const { domain, user } = context.state;
21
21
  const { tag } = args;
22
- const subdomain = domain === null || domain === void 0 ? void 0 : domain.subdomain;
22
+ const subdomain = domain?.subdomain;
23
23
  if (!domain || !tag) {
24
24
  throw new Error('domain and tag required');
25
25
  }
26
26
  //@ts-ignore
27
- if (!((_a = user.domains) === null || _a === void 0 ? void 0 : _a.find(d => d.subdomain === subdomain)) && !process.superUserGranted(domain, user)) {
27
+ if (!user.domains?.find(d => d.subdomain === subdomain) && !process.superUserGranted(domain, user)) {
28
28
  throw new Error(`domain(${subdomain}) is not working for user(${user.email}).`);
29
29
  }
30
30
  return (0, graphql_yoga_1.pipe)(pubsub_js_1.pubsub.subscribe('data'), (0, graphql_yoga_1.filter)((payload) => {
31
31
  const { domain: pdomain, tag: ptag, data } = payload.data;
32
- return tag === ptag && subdomain === (pdomain === null || pdomain === void 0 ? void 0 : pdomain.subdomain);
32
+ return tag === ptag && subdomain === pdomain?.subdomain;
33
33
  }));
34
34
  }
35
35
  }),
36
36
  tslib_1.__param(0, (0, type_graphql_1.Root)()),
37
- tslib_1.__param(1, (0, type_graphql_1.Arg)('tag')),
37
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('tag', { description: 'The tag used to filter and identify the data stream for subscription.' })),
38
38
  tslib_1.__metadata("design:type", Function),
39
39
  tslib_1.__metadata("design:paramtypes", [Object, String]),
40
40
  tslib_1.__metadata("design:returntype", data_types_js_1.Data)
@@ -1 +1 @@
1
- {"version":3,"file":"data-resolver.js","sourceRoot":"","sources":["../../../server/service/subscription-data/data-resolver.ts"],"names":[],"mappings":";;;;AAAA,+CAA2C;AAC3C,+CAAgE;AAEhE,+CAAwC;AACxC,mDAAsC;AAEtC,4FAA4F;AAErF,IAAM,YAAY,GAAlB,MAAM,YAAY;IAyBvB,IAAI,CAAS,OAAuB,EAAc,GAAW;QAC3D,OAAO,OAAO,CAAC,IAAI,CAAA;IACrB,CAAC;CACF,CAAA;AA5BY,oCAAY;AAyBvB;IAxBC,IAAA,2BAAY,EAAC;QACZ,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;;YACrC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;YACtC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;YACpB,MAAM,SAAS,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAA;YAEnC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;YAC5C,CAAC;YAED,YAAY;YACZ,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAA,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;gBACnG,MAAM,IAAI,KAAK,CAAC,UAAU,SAAS,6BAA6B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAA;YACjF,CAAC;YAED,OAAO,IAAA,mBAAI,EACT,kBAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EACxB,IAAA,qBAAM,EAAC,CAAC,OAAuB,EAAE,EAAE;gBACjC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAA;gBACzD,OAAO,GAAG,KAAK,IAAI,IAAI,SAAS,MAAK,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAA,CAAA;YACzD,CAAC,CAAC,CACH,CAAA;QACH,CAAC;KACF,CAAC;IACI,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAA2B,mBAAA,IAAA,kBAAG,EAAC,KAAK,CAAC,CAAA;;;4CAAe,oBAAI;wCAEnE;uBA3BU,YAAY;IADxB,IAAA,uBAAQ,GAAE;GACE,YAAY,CA4BxB","sourcesContent":["import { filter, pipe } from 'graphql-yoga'\nimport { Arg, Resolver, Root, Subscription } from 'type-graphql'\n\nimport { pubsub } from '../../pubsub.js'\nimport { Data } from './data-types.js'\n\n/* 이 Resolver는 @things-factory/integration-base 에서 Overide 된다. (state-register를 사용하기 위해서) */\n@Resolver()\nexport class DataResolver {\n @Subscription({\n subscribe: ({ args, context, info }) => {\n const { domain, user } = context.state\n const { tag } = args\n const subdomain = domain?.subdomain\n\n if (!domain || !tag) {\n throw new Error('domain and tag required')\n }\n\n //@ts-ignore\n if (!user.domains?.find(d => d.subdomain === subdomain) && !process.superUserGranted(domain, user)) {\n throw new Error(`domain(${subdomain}) is not working for user(${user.email}).`)\n }\n\n return pipe(\n pubsub.subscribe('data'),\n filter((payload: { data: Data }) => {\n const { domain: pdomain, tag: ptag, data } = payload.data\n return tag === ptag && subdomain === pdomain?.subdomain\n })\n )\n }\n })\n data(@Root() payload: { data: Data }, @Arg('tag') tag: string): Data {\n return payload.data\n }\n}\n"]}
1
+ {"version":3,"file":"data-resolver.js","sourceRoot":"","sources":["../../../server/service/subscription-data/data-resolver.ts"],"names":[],"mappings":";;;;AAAA,+CAA2C;AAC3C,+CAAgE;AAEhE,+CAAwC;AACxC,mDAAsC;AAEtC,4FAA4F;AAErF,IAA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AAA,mBAAI,GAAE,CAAA;IACN,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,EAAE,WAAW,EAAE,uEAAuE,EAAE,CAAC,CAAA;;;4CACpG,oBAAI;wCAEN;uBAhCU,YAAY;IADxB,IAAA,uBAAQ,GAAE;GACE,YAAY,CAiCxB","sourcesContent":["import { filter, pipe } from 'graphql-yoga'\nimport { Arg, Resolver, Root, Subscription } from 'type-graphql'\n\nimport { pubsub } from '../../pubsub.js'\nimport { Data } from './data-types.js'\n\n/* 이 Resolver는 @things-factory/integration-base 에서 Overide 된다. (state-register를 사용하기 위해서) */\n@Resolver()\nexport class DataResolver {\n @Subscription({\n description:\n 'Subscribes to real-time data updates for a specific tag within the current domain. Only users belonging to the domain or superusers are allowed to subscribe.',\n subscribe: ({ args, context, info }) => {\n const { domain, user } = context.state\n const { tag } = args\n const subdomain = domain?.subdomain\n\n if (!domain || !tag) {\n throw new Error('domain and tag required')\n }\n\n //@ts-ignore\n if (!user.domains?.find(d => d.subdomain === subdomain) && !process.superUserGranted(domain, user)) {\n throw new Error(`domain(${subdomain}) is not working for user(${user.email}).`)\n }\n\n return pipe(\n pubsub.subscribe('data'),\n filter((payload: { data: Data }) => {\n const { domain: pdomain, tag: ptag, data } = payload.data\n return tag === ptag && subdomain === pdomain?.subdomain\n })\n )\n }\n })\n data(\n @Root() payload: { data: Data },\n @Arg('tag', { description: 'The tag used to filter and identify the data stream for subscription.' }) tag: string\n ): Data {\n return payload.data\n }\n}\n"]}
@@ -9,18 +9,23 @@ let Data = class Data {
9
9
  };
10
10
  exports.Data = Data;
11
11
  tslib_1.__decorate([
12
- (0, type_graphql_1.Field)(type => domain_js_1.Domain, { nullable: true, description: 'The domain where the data originated' }),
12
+ (0, type_graphql_1.Field)(type => domain_js_1.Domain, { nullable: true, description: 'The domain where the data originated.' }),
13
13
  tslib_1.__metadata("design:type", domain_js_1.Domain)
14
14
  ], Data.prototype, "domain", void 0);
15
15
  tslib_1.__decorate([
16
- (0, type_graphql_1.Field)({ description: 'Tag name attached to data' }),
16
+ (0, type_graphql_1.Field)({ description: 'The tag name attached to the data, used for filtering and identification.' }),
17
17
  tslib_1.__metadata("design:type", String)
18
18
  ], Data.prototype, "tag", void 0);
19
19
  tslib_1.__decorate([
20
- (0, type_graphql_1.Field)(type => scalar_object_js_1.ScalarObject, { nullable: true, description: 'Data delivered by subscription' }),
20
+ (0, type_graphql_1.Field)(type => scalar_object_js_1.ScalarObject, {
21
+ nullable: true,
22
+ description: 'The actual data content delivered by the subscription.'
23
+ }),
21
24
  tslib_1.__metadata("design:type", Object)
22
25
  ], Data.prototype, "data", void 0);
23
26
  exports.Data = Data = tslib_1.__decorate([
24
- (0, type_graphql_1.ObjectType)()
27
+ (0, type_graphql_1.ObjectType)({
28
+ description: 'Represents a data payload delivered via subscription, including its domain, tag, and content.'
29
+ })
25
30
  ], Data);
26
31
  //# sourceMappingURL=data-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-types.js","sourceRoot":"","sources":["../../../server/service/subscription-data/data-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgD;AAEhD,uEAA+D;AAC/D,mDAA4C;AAGrC,IAAM,IAAI,GAAV,MAAM,IAAI;CAShB,CAAA;AATY,oBAAI;AAEf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;sCACtF,kBAAM;oCAAA;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;;iCACzC;AAGX;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,+BAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;sCACxF,MAAM;kCAAA;eARF,IAAI;IADhB,IAAA,yBAAU,GAAE;GACA,IAAI,CAShB","sourcesContent":["import { Field, ObjectType } from 'type-graphql'\n\nimport { ScalarObject } from '../common-types/scalar-object.js'\nimport { Domain } from '../domain/domain.js'\n\n@ObjectType()\nexport class Data {\n @Field(type => Domain, { nullable: true, description: 'The domain where the data originated' })\n domain?: Domain\n\n @Field({ description: 'Tag name attached to data' })\n tag: string\n\n @Field(type => ScalarObject, { nullable: true, description: 'Data delivered by subscription' })\n data?: Object\n}\n"]}
1
+ {"version":3,"file":"data-types.js","sourceRoot":"","sources":["../../../server/service/subscription-data/data-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgD;AAEhD,uEAA+D;AAC/D,mDAA4C;AAKrC,IAAM,IAAI,GAAV,MAAM,IAAI;CAYhB,CAAA;AAZY,oBAAI;AAEf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;sCACvF,kBAAM;oCAAA;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,2EAA2E,EAAE,CAAC;;iCACzF;AAMX;IAJC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,+BAAY,EAAE;QAC3B,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,wDAAwD;KACtE,CAAC;sCACK,MAAM;kCAAA;eAXF,IAAI;IAHhB,IAAA,yBAAU,EAAC;QACV,WAAW,EAAE,+FAA+F;KAC7G,CAAC;GACW,IAAI,CAYhB","sourcesContent":["import { Field, ObjectType } from 'type-graphql'\n\nimport { ScalarObject } from '../common-types/scalar-object.js'\nimport { Domain } from '../domain/domain.js'\n\n@ObjectType({\n description: 'Represents a data payload delivered via subscription, including its domain, tag, and content.'\n})\nexport class Data {\n @Field(type => Domain, { nullable: true, description: 'The domain where the data originated.' })\n domain?: Domain\n\n @Field({ description: 'The tag name attached to the data, used for filtering and identification.' })\n tag: string\n\n @Field(type => ScalarObject, {\n nullable: true,\n description: 'The actual data content delivered by the subscription.'\n })\n data?: Object\n}\n"]}
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ // This module provides GraphQL resolvers and types for real-time data subscriptions.
3
+ // It enables clients to subscribe to data updates filtered by tag and domain.
4
+ // Use this module to implement pub/sub patterns for live data delivery in the application.
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.resolvers = exports.entities = void 0;
4
7
  const data_resolver_js_1 = require("./data-resolver.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/subscription-data/index.ts"],"names":[],"mappings":";;;AAAA,yDAAiD;AAEpC,QAAA,QAAQ,GAAG,EAAE,CAAA;AACb,QAAA,SAAS,GAAG,CAAC,+BAAY,CAAC,CAAA","sourcesContent":["import { DataResolver } from './data-resolver.js'\n\nexport const entities = []\nexport const resolvers = [DataResolver]\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/subscription-data/index.ts"],"names":[],"mappings":";AAAA,qFAAqF;AACrF,8EAA8E;AAC9E,2FAA2F;;;AAE3F,yDAAiD;AAEpC,QAAA,QAAQ,GAAG,EAAE,CAAA;AACb,QAAA,SAAS,GAAG,CAAC,+BAAY,CAAC,CAAA","sourcesContent":["// This module provides GraphQL resolvers and types for real-time data subscriptions.\n// It enables clients to subscribe to data updates filtered by tag and domain.\n// Use this module to implement pub/sub patterns for live data delivery in the application.\n\nimport { DataResolver } from './data-resolver.js'\n\nexport const entities = []\nexport const resolvers = [DataResolver]\n"]}