@things-factory/shell 6.0.101 → 6.0.107

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 (62) hide show
  1. package/client/scene/scene-viewer.js +1 -1
  2. package/dist-server/service/attribute/attribute-item-type.d.ts +29 -0
  3. package/dist-server/service/attribute/attribute-item-type.js +81 -0
  4. package/dist-server/service/attribute/attribute-item-type.js.map +1 -0
  5. package/dist-server/service/attribute/attribute-mutation.d.ts +10 -0
  6. package/dist-server/service/attribute/attribute-mutation.js +130 -0
  7. package/dist-server/service/attribute/attribute-mutation.js.map +1 -0
  8. package/dist-server/service/attribute/attribute-query.d.ts +8 -0
  9. package/dist-server/service/attribute/attribute-query.js +60 -0
  10. package/dist-server/service/attribute/attribute-query.js.map +1 -0
  11. package/dist-server/service/attribute/attribute-type.d.ts +19 -0
  12. package/dist-server/service/attribute/attribute-type.js +70 -0
  13. package/dist-server/service/attribute/attribute-type.js.map +1 -0
  14. package/dist-server/service/attribute/attribute.d.ts +9 -0
  15. package/dist-server/service/attribute/attribute.js +52 -0
  16. package/dist-server/service/attribute/attribute.js.map +1 -0
  17. package/dist-server/service/attribute/index.d.ts +5 -0
  18. package/dist-server/service/attribute/index.js +9 -0
  19. package/dist-server/service/attribute/index.js.map +1 -0
  20. package/dist-server/service/attribute-set/attribute-set-item-type.d.ts +31 -0
  21. package/dist-server/service/attribute-set/attribute-set-item-type.js +89 -0
  22. package/dist-server/service/attribute-set/attribute-set-item-type.js.map +1 -0
  23. package/dist-server/service/attribute-set/attribute-set-mutation.d.ts +10 -0
  24. package/dist-server/service/attribute-set/attribute-set-mutation.js +130 -0
  25. package/dist-server/service/attribute-set/attribute-set-mutation.js.map +1 -0
  26. package/dist-server/service/attribute-set/attribute-set-query.d.ts +8 -0
  27. package/dist-server/service/attribute-set/attribute-set-query.js +60 -0
  28. package/dist-server/service/attribute-set/attribute-set-query.js.map +1 -0
  29. package/dist-server/service/attribute-set/attribute-set-type.d.ts +19 -0
  30. package/dist-server/service/attribute-set/attribute-set-type.js +70 -0
  31. package/dist-server/service/attribute-set/attribute-set-type.js.map +1 -0
  32. package/dist-server/service/attribute-set/attribute-set.d.ts +9 -0
  33. package/dist-server/service/attribute-set/attribute-set.js +52 -0
  34. package/dist-server/service/attribute-set/attribute-set.js.map +1 -0
  35. package/dist-server/service/attribute-set/index.d.ts +5 -0
  36. package/dist-server/service/attribute-set/index.js +9 -0
  37. package/dist-server/service/attribute-set/index.js.map +1 -0
  38. package/dist-server/service/domain/domain-resolver.d.ts +1 -1
  39. package/dist-server/service/domain/domain-resolver.js +3 -2
  40. package/dist-server/service/domain/domain-resolver.js.map +1 -1
  41. package/dist-server/service/domain/domain-types.d.ts +1 -0
  42. package/dist-server/service/domain/domain-types.js +5 -0
  43. package/dist-server/service/domain/domain-types.js.map +1 -1
  44. package/dist-server/service/domain/domain.d.ts +1 -0
  45. package/dist-server/service/domain/domain.js +6 -0
  46. package/dist-server/service/domain/domain.js.map +1 -1
  47. package/dist-server/service/index.d.ts +3 -2
  48. package/dist-server/service/index.js +4 -2
  49. package/dist-server/service/index.js.map +1 -1
  50. package/dist-server/tsconfig.tsbuildinfo +1 -1
  51. package/helps/shell/attribute.md +160 -0
  52. package/package.json +2 -2
  53. package/server/service/attribute-set/attribute-set-item-type.ts +65 -0
  54. package/server/service/attribute-set/attribute-set-mutation.ts +125 -0
  55. package/server/service/attribute-set/attribute-set-query.ts +36 -0
  56. package/server/service/attribute-set/attribute-set-type.ts +46 -0
  57. package/server/service/attribute-set/attribute-set.ts +35 -0
  58. package/server/service/attribute-set/index.ts +6 -0
  59. package/server/service/domain/domain-resolver.ts +1 -1
  60. package/server/service/domain/domain-types.ts +4 -1
  61. package/server/service/domain/domain.ts +5 -0
  62. package/server/service/index.ts +5 -8
@@ -4,6 +4,7 @@ exports.DomainList = exports.DomainPatch = exports.DomainInput = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const type_graphql_1 = require("type-graphql");
6
6
  const domain_1 = require("./domain");
7
+ const common_types_1 = require("../common-types");
7
8
  let DomainInput = class DomainInput {
8
9
  };
9
10
  tslib_1.__decorate([
@@ -56,6 +57,10 @@ tslib_1.__decorate([
56
57
  (0, type_graphql_1.Field)({ nullable: true }),
57
58
  tslib_1.__metadata("design:type", String)
58
59
  ], DomainPatch.prototype, "contentImage", void 0);
60
+ tslib_1.__decorate([
61
+ (0, type_graphql_1.Field)(type => common_types_1.ScalarObject, { nullable: true }),
62
+ tslib_1.__metadata("design:type", Object)
63
+ ], DomainPatch.prototype, "attributes", void 0);
59
64
  tslib_1.__decorate([
60
65
  (0, type_graphql_1.Field)({ nullable: true }),
61
66
  tslib_1.__metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"domain-types.js","sourceRoot":"","sources":["../../../server/service/domain/domain-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,qCAAiC;AAI1B,IAAM,WAAW,GAAjB,MAAM,WAAW;CAMvB,CAAA;AALC;IAAC,IAAA,oBAAK,GAAE;;yCACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AALT,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CAMvB;AANY,kCAAW;AASjB,IAAM,WAAW,GAAjB,MAAM,WAAW;CA8BvB,CAAA;AA7BC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACf;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACT;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACb,OAAO;+CAAA;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACR;AAElB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACR;AAElB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACP;AAEnB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACL;AAErB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACZ;AA7BH,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CA8BvB;AA9BY,kCAAW;AAiCjB,IAAM,UAAU,GAAhB,MAAM,UAAU;CAMtB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,eAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC7B;AAEf;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1B;AALF,UAAU;IADtB,IAAA,yBAAU,GAAE;GACA,UAAU,CAMtB;AANY,gCAAU","sourcesContent":["import { ObjectType, InputType, Field, Int } from 'type-graphql'\nimport { Domain } from './domain'\nimport { ObjectRef } from '../common-types/object-ref'\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 brandName?: string\n\n @Field({ nullable: true })\n brandImage?: string\n\n @Field({ nullable: true })\n contentImage?: string\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,qCAAiC;AACjC,kDAA8C;AAGvC,IAAM,WAAW,GAAjB,MAAM,WAAW;CAMvB,CAAA;AALC;IAAC,IAAA,oBAAK,GAAE;;yCACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AALT,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CAMvB;AANY,kCAAW;AASjB,IAAM,WAAW,GAAjB,MAAM,WAAW;CAiCvB,CAAA;AAhCC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACf;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACT;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACb,OAAO;+CAAA;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACR;AAElB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACR;AAElB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACP;AAEnB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACL;AAErB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,2BAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAChC;AAEhB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACZ;AAhCH,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CAiCvB;AAjCY,kCAAW;AAoCjB,IAAM,UAAU,GAAhB,MAAM,UAAU;CAMtB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,eAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC7B;AAEf;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1B;AALF,UAAU;IADtB,IAAA,yBAAU,GAAE;GACA,UAAU,CAMtB;AANY,gCAAU","sourcesContent":["import { ObjectType, InputType, Field, Int } from 'type-graphql'\nimport { Domain } from './domain'\nimport { ScalarObject } from '../common-types'\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 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"]}
@@ -11,6 +11,7 @@ export declare class Domain {
11
11
  contentImage: string;
12
12
  owner: string;
13
13
  theme: string;
14
+ attributes?: any;
14
15
  createdAt: Date;
15
16
  updatedAt: Date;
16
17
  }
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const typeorm_1 = require("typeorm");
6
6
  const type_graphql_1 = require("type-graphql");
7
7
  const env_1 = require("@things-factory/env");
8
+ const common_types_1 = require("../common-types");
8
9
  const numericTypes = ['int', 'int2', 'int4', 'int8', 'integer', 'tinyint', 'smallint', 'mediumint', 'bigint'];
9
10
  const generatedStrategy = ['uuid', 'rowid', 'increment', 'identity'];
10
11
  const domainPrimaryOption = env_1.config.get('domainPrimaryOption');
@@ -120,6 +121,11 @@ tslib_1.__decorate([
120
121
  }),
121
122
  tslib_1.__metadata("design:type", String)
122
123
  ], Domain.prototype, "theme", void 0);
124
+ tslib_1.__decorate([
125
+ (0, typeorm_1.Column)('simple-json', { nullable: true }),
126
+ (0, type_graphql_1.Field)(type => common_types_1.ScalarObject, { nullable: true }),
127
+ tslib_1.__metadata("design:type", Object)
128
+ ], Domain.prototype, "attributes", void 0);
123
129
  tslib_1.__decorate([
124
130
  (0, type_graphql_1.Field)({ nullable: true }),
125
131
  (0, typeorm_1.CreateDateColumn)(),
@@ -1 +1 @@
1
- {"version":3,"file":"domain.js","sourceRoot":"","sources":["../../../server/service/domain/domain.ts"],"names":[],"mappings":";;;;AAAA,qCAAmF;AACnF,+CAAoD;AACpD,6CAA4C;AAE5C,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,C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C;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;qCACW;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzB,IAAA,0BAAgB,GAAE;sCACR,IAAI;yCAAA;AAEf;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzB,IAAA,0BAAgB,GAAE;sCACR,IAAI;yCAAA;AAxGJ,MAAM;IAHlB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,aAAa,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC9E,IAAA,yBAAU,GAAE;GACA,MAAM,CAyGlB;AAzGY,wBAAM","sourcesContent":["import { Column, CreateDateColumn, Entity, Index, UpdateDateColumn } from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\nimport { config } from '@things-factory/env'\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\n@Entity()\n@Index('ix_domain_0', (domain: Domain) => [domain.subdomain], { unique: true })\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({\n unique: true\n })\n name: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n description: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n extType: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n timezone: string\n\n @Field({ nullable: true })\n @Column({\n default: false\n })\n systemFlag: boolean\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n subdomain: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n brandName: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n brandImage: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n contentImage: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n owner: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n theme: string\n\n @Field({ nullable: true })\n @CreateDateColumn()\n createdAt: Date\n\n @Field({ nullable: true })\n @UpdateDateColumn()\n updatedAt: Date\n}\n"]}
1
+ {"version":3,"file":"domain.js","sourceRoot":"","sources":["../../../server/service/domain/domain.ts"],"names":[],"mappings":";;;;AAAA,qCAAmF;AACnF,+CAAoD;AACpD,6CAA4C;AAC5C,kDAA8C;AAE9C,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;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AE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAChC;AAEhB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzB,IAAA,0BAAgB,GAAE;sCACR,IAAI;yCAAA;AAEf;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzB,IAAA,0BAAgB,GAAE;sCACR,IAAI;yCAAA;AA5GJ,MAAM;IAHlB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,aAAa,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC9E,IAAA,yBAAU,GAAE;GACA,MAAM,CA6GlB;AA7GY,wBAAM","sourcesContent":["import { Column, CreateDateColumn, Entity, Index, UpdateDateColumn } from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\nimport { config } from '@things-factory/env'\nimport { ScalarObject } from '../common-types'\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\n@Entity()\n@Index('ix_domain_0', (domain: Domain) => [domain.subdomain], { unique: true })\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({\n unique: true\n })\n name: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n description: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n extType: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n timezone: string\n\n @Field({ nullable: true })\n @Column({\n default: false\n })\n systemFlag: boolean\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n subdomain: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n brandName: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n brandImage: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n contentImage: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n owner: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n theme: string\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"]}
@@ -1,13 +1,14 @@
1
1
  export * from './common-types';
2
2
  export * from './domain/domain';
3
+ export * from './domain/domain';
3
4
  export * from './domain/domain-types';
4
5
  export * from './subscription-data/data-types';
5
- export declare const entities: typeof import("./domain/domain").Domain[];
6
+ export declare const entities: (typeof import("./domain/domain").Domain | typeof import("./attribute-set/attribute-set").AttributeSet)[];
6
7
  export declare const schema: {
7
8
  typeDefs: {
8
9
  transactionDirectiveTypeDefs: import("graphql").DocumentNode;
9
10
  };
10
- resolverClasses: (typeof import("./domain/domain-resolver").DomainResolver | typeof import("./subscription-data/data-resolver").DataResolver)[];
11
+ resolverClasses: (typeof import("./domain/domain-resolver").DomainResolver | typeof import("./attribute-set/attribute-set-query").AttributeSetQuery | typeof import("./attribute-set/attribute-set-mutation").AttributeSetMutation | typeof import("./subscription-data/data-resolver").DataResolver)[];
11
12
  directives: {
12
13
  transaction: (schema: import("graphql").GraphQLSchema) => import("graphql").GraphQLSchema;
13
14
  };
@@ -4,15 +4,17 @@ exports.schema = exports.entities = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const directive_transaction_1 = require("./directive-transaction");
6
6
  const domain_1 = require("./domain");
7
+ const attribute_set_1 = require("./attribute-set");
7
8
  const subscription_data_1 = require("./subscription-data");
8
9
  tslib_1.__exportStar(require("./common-types"), exports);
9
10
  tslib_1.__exportStar(require("./domain/domain"), exports);
11
+ tslib_1.__exportStar(require("./domain/domain"), exports);
10
12
  /* EXPORT TYPES */
11
13
  tslib_1.__exportStar(require("./domain/domain-types"), exports);
12
14
  tslib_1.__exportStar(require("./subscription-data/data-types"), exports);
13
15
  exports.entities = [
14
16
  /* Entities */
15
- ...domain_1.entities,
17
+ ...attribute_set_1.entities,
16
18
  ...domain_1.entities
17
19
  ];
18
20
  exports.schema = {
@@ -21,7 +23,7 @@ exports.schema = {
21
23
  },
22
24
  resolverClasses: [
23
25
  /* Resolvers */
24
- ...domain_1.resolvers,
26
+ ...attribute_set_1.resolvers,
25
27
  ...domain_1.resolvers,
26
28
  ...subscription_data_1.resolvers
27
29
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,mEAAoG;AACpG,qCAKiB;AACjB,2DAA4E;AAE5E,yDAA8B;AAC9B,0DAA+B;AAE/B,kBAAkB;AAClB,gEAAqC;AACrC,yEAA8C;AAEjC,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,iBAAY;IACf,GAAG,iBAAc;CAClB,CAAA;AACY,QAAA,MAAM,GAAG;IACpB,QAAQ,EAAE;QACR,4BAA4B,EAA5B,oDAA4B;KAC7B;IACD,eAAe,EAAE;QACf,eAAe;QACf,GAAG,kBAAa;QAChB,GAAG,kBAAe;QAClB,GAAG,6BAAyB;KAC7B;IACD,UAAU,EAAE;QACV,WAAW,EAAE,oDAA4B;KAC1C;CACF,CAAA","sourcesContent":["import { transactionDirectiveResolver, transactionDirectiveTypeDefs } from './directive-transaction'\nimport {\n entities as DataEntities,\n entities as DomainEntities,\n resolvers as DataResolvers,\n resolvers as DomainResolvers\n} from './domain'\nimport { resolvers as SubscriptionDataResolvers } from './subscription-data'\n\nexport * from './common-types'\nexport * from './domain/domain'\n\n/* EXPORT TYPES */\nexport * from './domain/domain-types'\nexport * from './subscription-data/data-types'\n\nexport const entities = [\n /* Entities */\n ...DataEntities,\n ...DomainEntities\n]\nexport const schema = {\n typeDefs: {\n transactionDirectiveTypeDefs\n },\n resolverClasses: [\n /* Resolvers */\n ...DataResolvers,\n ...DomainResolvers,\n ...SubscriptionDataResolvers\n ],\n directives: {\n transaction: transactionDirectiveResolver\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,mEAAoG;AACpG,qCAAmF;AACnF,mDAAgG;AAChG,2DAA4E;AAE5E,yDAA8B;AAC9B,0DAA+B;AAC/B,0DAA+B;AAE/B,kBAAkB;AAClB,gEAAqC;AACrC,yEAA8C;AAEjC,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,wBAAiB;IACpB,GAAG,iBAAc;CAClB,CAAA;AACY,QAAA,MAAM,GAAG;IACpB,QAAQ,EAAE;QACR,4BAA4B,EAA5B,oDAA4B;KAC7B;IACD,eAAe,EAAE;QACf,eAAe;QACf,GAAG,yBAAkB;QACrB,GAAG,kBAAe;QAClB,GAAG,6BAAyB;KAC7B;IACD,UAAU,EAAE;QACV,WAAW,EAAE,oDAA4B;KAC1C;CACF,CAAA","sourcesContent":["import { transactionDirectiveResolver, transactionDirectiveTypeDefs } from './directive-transaction'\nimport { entities as DomainEntities, resolvers as DomainResolvers } from './domain'\nimport { entities as AttributeEntities, resolvers as AttributeResolvers } from './attribute-set'\nimport { resolvers as SubscriptionDataResolvers } from './subscription-data'\n\nexport * from './common-types'\nexport * from './domain/domain'\nexport * from './domain/domain'\n\n/* EXPORT TYPES */\nexport * from './domain/domain-types'\nexport * from './subscription-data/data-types'\n\nexport const entities = [\n /* Entities */\n ...AttributeEntities,\n ...DomainEntities\n]\nexport const schema = {\n typeDefs: {\n transactionDirectiveTypeDefs\n },\n resolverClasses: [\n /* Resolvers */\n ...AttributeResolvers,\n ...DomainResolvers,\n ...SubscriptionDataResolvers\n ],\n directives: {\n transaction: transactionDirectiveResolver\n }\n}\n"]}