@puzzlin/models 0.13.3 → 0.14.0

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 (64) hide show
  1. package/dist/eeg-reports/args/eeg-reports.args.d.ts +1 -1
  2. package/dist/eeg-reports/args/eeg-reports.args.d.ts.map +1 -1
  3. package/dist/eeg-reports/args/eeg-reports.args.js +2 -2
  4. package/dist/eeg-reports/args/eeg-reports.args.js.map +1 -1
  5. package/dist/eeg-reports/connections/eeg-report-union.connection.d.ts +5 -0
  6. package/dist/eeg-reports/connections/eeg-report-union.connection.d.ts.map +1 -0
  7. package/dist/eeg-reports/connections/eeg-report-union.connection.js +18 -0
  8. package/dist/eeg-reports/connections/eeg-report-union.connection.js.map +1 -0
  9. package/dist/eeg-reports/connections/index.d.ts +3 -0
  10. package/dist/eeg-reports/connections/index.d.ts.map +1 -0
  11. package/dist/eeg-reports/connections/index.js +19 -0
  12. package/dist/eeg-reports/connections/index.js.map +1 -0
  13. package/dist/eeg-reports/connections/individual-eeg-report.connection.d.ts +6 -0
  14. package/dist/eeg-reports/connections/individual-eeg-report.connection.d.ts.map +1 -0
  15. package/dist/eeg-reports/connections/individual-eeg-report.connection.js +18 -0
  16. package/dist/eeg-reports/connections/individual-eeg-report.connection.js.map +1 -0
  17. package/dist/eeg-reports/index.d.ts +1 -0
  18. package/dist/eeg-reports/index.d.ts.map +1 -1
  19. package/dist/eeg-reports/index.js +1 -0
  20. package/dist/eeg-reports/index.js.map +1 -1
  21. package/dist/eeg-reports/unions/eeg-report.union.d.ts +1 -0
  22. package/dist/eeg-reports/unions/eeg-report.union.d.ts.map +1 -1
  23. package/dist/eeg-reports/unions/eeg-report.union.js +3 -2
  24. package/dist/eeg-reports/unions/eeg-report.union.js.map +1 -1
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +1 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/pagination/args/index.d.ts +2 -0
  30. package/dist/pagination/args/index.d.ts.map +1 -0
  31. package/dist/pagination/args/index.js +18 -0
  32. package/dist/pagination/args/index.js.map +1 -0
  33. package/dist/pagination/args/pagination.args.d.ts.map +1 -0
  34. package/dist/pagination/args/pagination.args.js.map +1 -0
  35. package/dist/pagination/index.d.ts +3 -0
  36. package/dist/pagination/index.d.ts.map +1 -0
  37. package/dist/pagination/index.js +19 -0
  38. package/dist/pagination/index.js.map +1 -0
  39. package/dist/pagination/objects/connection.object-factory.d.ts +17 -0
  40. package/dist/pagination/objects/connection.object-factory.d.ts.map +1 -0
  41. package/dist/pagination/objects/connection.object-factory.js +71 -0
  42. package/dist/pagination/objects/connection.object-factory.js.map +1 -0
  43. package/dist/pagination/objects/index.d.ts +4 -0
  44. package/dist/pagination/objects/index.d.ts.map +1 -0
  45. package/dist/pagination/objects/index.js +20 -0
  46. package/dist/pagination/objects/index.js.map +1 -0
  47. package/dist/pagination/objects/page-info.object.d.ts +7 -0
  48. package/dist/pagination/objects/page-info.object.d.ts.map +1 -0
  49. package/dist/pagination/objects/page-info.object.js +45 -0
  50. package/dist/pagination/objects/page-info.object.js.map +1 -0
  51. package/dist/pagination/objects/union-connection.object-factory.d.ts +11 -0
  52. package/dist/pagination/objects/union-connection.object-factory.d.ts.map +1 -0
  53. package/dist/pagination/objects/union-connection.object-factory.js +74 -0
  54. package/dist/pagination/objects/union-connection.object-factory.js.map +1 -0
  55. package/dist/tsconfig.tsbuildinfo +1 -1
  56. package/dist/utils/args/index.d.ts +0 -1
  57. package/dist/utils/args/index.d.ts.map +1 -1
  58. package/dist/utils/args/index.js +0 -1
  59. package/dist/utils/args/index.js.map +1 -1
  60. package/package.json +1 -1
  61. package/dist/utils/args/pagination.args.d.ts.map +0 -1
  62. package/dist/utils/args/pagination.args.js.map +0 -1
  63. /package/dist/{utils → pagination}/args/pagination.args.d.ts +0 -0
  64. /package/dist/{utils → pagination}/args/pagination.args.js +0 -0
@@ -1,4 +1,4 @@
1
- import { PaginationArgs } from '../../utils';
1
+ import { PaginationArgs } from '../../pagination';
2
2
  import { EegReportStatusEnum, EegReportTypeEnum } from '@puzzlin/enums';
3
3
  export declare class EegReportsArgs extends PaginationArgs {
4
4
  explorerId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"eeg-reports.args.d.ts","sourceRoot":"","sources":["../../../src/eeg-reports/args/eeg-reports.args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExE,qBACa,cAAe,SAAQ,cAAc;IAKhD,UAAU,CAAC,EAAE,MAAM,CAAC;IAMpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAMxB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAM7B,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B"}
1
+ {"version":3,"file":"eeg-reports.args.d.ts","sourceRoot":"","sources":["../../../src/eeg-reports/args/eeg-reports.args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExE,qBACa,cAAe,SAAQ,cAAc;IAKhD,UAAU,CAAC,EAAE,MAAM,CAAC;IAMpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAMxB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAM7B,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B"}
@@ -10,10 +10,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.EegReportsArgs = void 0;
13
- const utils_1 = require("../../utils");
13
+ const pagination_1 = require("../../pagination");
14
14
  const graphql_1 = require("@nestjs/graphql");
15
15
  const enums_1 = require("@puzzlin/enums");
16
- let EegReportsArgs = exports.EegReportsArgs = class EegReportsArgs extends utils_1.PaginationArgs {
16
+ let EegReportsArgs = exports.EegReportsArgs = class EegReportsArgs extends pagination_1.PaginationArgs {
17
17
  };
18
18
  __decorate([
19
19
  (0, graphql_1.Field)(() => graphql_1.ID, {
@@ -1 +1 @@
1
- {"version":3,"file":"eeg-reports.args.js","sourceRoot":"","sources":["../../../src/eeg-reports/args/eeg-reports.args.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAyC;AACzC,6CAAsD;AACtD,0CAAwE;AAGjE,IAAM,cAAc,4BAApB,MAAM,cAAe,SAAQ,sBAAc;CAwBjD,CAAA;AAnBC;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,WAAW,EAAE,iDAAiD;QAC9D,QAAQ,EAAE,IAAI;KACf,CAAC;;kDACkB;AAMpB;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,WAAW,EAAE,wDAAwD;QACrE,QAAQ,EAAE,IAAI;KACf,CAAC;;sDACsB;AAMxB;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,2BAAmB,EAAE;QAChC,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE,IAAI;KACf,CAAC;;8CAC2B;AAM7B;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,yBAAiB,EAAE;QAC9B,WAAW,EAAE,gCAAgC;QAC7C,QAAQ,EAAE,IAAI;KACf,CAAC;;4CACuB;yBAvBd,cAAc;IAD1B,IAAA,kBAAQ,GAAE;GACE,cAAc,CAwB1B"}
1
+ {"version":3,"file":"eeg-reports.args.js","sourceRoot":"","sources":["../../../src/eeg-reports/args/eeg-reports.args.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,6CAAsD;AACtD,0CAAwE;AAGjE,IAAM,cAAc,4BAApB,MAAM,cAAe,SAAQ,2BAAc;CAwBjD,CAAA;AAnBC;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,WAAW,EAAE,iDAAiD;QAC9D,QAAQ,EAAE,IAAI;KACf,CAAC;;kDACkB;AAMpB;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,WAAW,EAAE,wDAAwD;QACrE,QAAQ,EAAE,IAAI;KACf,CAAC;;sDACsB;AAMxB;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,2BAAmB,EAAE;QAChC,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE,IAAI;KACf,CAAC;;8CAC2B;AAM7B;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,yBAAiB,EAAE;QAC9B,WAAW,EAAE,gCAAgC;QAC7C,QAAQ,EAAE,IAAI;KACf,CAAC;;4CACuB;yBAvBd,cAAc;IAD1B,IAAA,kBAAQ,GAAE;GACE,cAAc,CAwB1B"}
@@ -0,0 +1,5 @@
1
+ declare const EegReportUnionConnection_base: import("@nestjs/common").Type<import("../../pagination").IConnectionType<any>>;
2
+ export declare class EegReportUnionConnection extends EegReportUnionConnection_base {
3
+ }
4
+ export {};
5
+ //# sourceMappingURL=eeg-report-union.connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eeg-report-union.connection.d.ts","sourceRoot":"","sources":["../../../src/eeg-reports/connections/eeg-report-union.connection.ts"],"names":[],"mappings":";AAIA,qBACa,wBAAyB,SAAQ,6BAAsD;CAAG"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.EegReportUnionConnection = void 0;
10
+ const pagination_1 = require("../../pagination");
11
+ const graphql_1 = require("@nestjs/graphql");
12
+ const unions_1 = require("../unions");
13
+ let EegReportUnionConnection = exports.EegReportUnionConnection = class EegReportUnionConnection extends (0, pagination_1.UnionConnection)(unions_1.EegReportUnion, unions_1.EEG_REPORT_UNION_NAME) {
14
+ };
15
+ exports.EegReportUnionConnection = EegReportUnionConnection = __decorate([
16
+ (0, graphql_1.ObjectType)()
17
+ ], EegReportUnionConnection);
18
+ //# sourceMappingURL=eeg-report-union.connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eeg-report-union.connection.js","sourceRoot":"","sources":["../../../src/eeg-reports/connections/eeg-report-union.connection.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6CAA+C;AAC/C,6CAA6C;AAC7C,sCAAkE;AAG3D,IAAM,wBAAwB,sCAA9B,MAAM,wBAAyB,SAAQ,IAAA,4BAAe,EAAC,uBAAc,EAAE,8BAAqB,CAAC;CAAG,CAAA;mCAA1F,wBAAwB;IADpC,IAAA,oBAAU,GAAE;GACA,wBAAwB,CAAkE"}
@@ -0,0 +1,3 @@
1
+ export * from './eeg-report-union.connection';
2
+ export * from './individual-eeg-report.connection';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/eeg-reports/connections/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./eeg-report-union.connection"), exports);
18
+ __exportStar(require("./individual-eeg-report.connection"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/eeg-reports/connections/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,qEAAmD"}
@@ -0,0 +1,6 @@
1
+ import { IndividualEegReport } from '../objects';
2
+ declare const IndividualEegReportConnection_base: import("@nestjs/common").Type<import("../../pagination").IConnectionType<IndividualEegReport>>;
3
+ export declare class IndividualEegReportConnection extends IndividualEegReportConnection_base {
4
+ }
5
+ export {};
6
+ //# sourceMappingURL=individual-eeg-report.connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"individual-eeg-report.connection.d.ts","sourceRoot":"","sources":["../../../src/eeg-reports/connections/individual-eeg-report.connection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;;AAEjD,qBACa,6BAA8B,SAAQ,kCAA+B;CAAG"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.IndividualEegReportConnection = void 0;
10
+ const pagination_1 = require("../../pagination");
11
+ const graphql_1 = require("@nestjs/graphql");
12
+ const objects_1 = require("../objects");
13
+ let IndividualEegReportConnection = exports.IndividualEegReportConnection = class IndividualEegReportConnection extends (0, pagination_1.Connection)(objects_1.IndividualEegReport) {
14
+ };
15
+ exports.IndividualEegReportConnection = IndividualEegReportConnection = __decorate([
16
+ (0, graphql_1.ObjectType)()
17
+ ], IndividualEegReportConnection);
18
+ //# sourceMappingURL=individual-eeg-report.connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"individual-eeg-report.connection.js","sourceRoot":"","sources":["../../../src/eeg-reports/connections/individual-eeg-report.connection.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6CAA0C;AAC1C,6CAA6C;AAC7C,wCAAiD;AAG1C,IAAM,6BAA6B,2CAAnC,MAAM,6BAA8B,SAAQ,IAAA,uBAAU,EAAC,6BAAmB,CAAC;CAAG,CAAA;wCAAxE,6BAA6B;IADzC,IAAA,oBAAU,GAAE;GACA,6BAA6B,CAA2C"}
@@ -1,4 +1,5 @@
1
1
  export * from './args';
2
+ export * from './connections';
2
3
  export * from './inputs';
3
4
  export * from './objects';
4
5
  export * from './payloads';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eeg-reports/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eeg-reports/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./args"), exports);
18
+ __exportStar(require("./connections"), exports);
18
19
  __exportStar(require("./inputs"), exports);
19
20
  __exportStar(require("./objects"), exports);
20
21
  __exportStar(require("./payloads"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eeg-reports/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eeg-reports/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,gDAA8B;AAC9B,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB"}
@@ -1,3 +1,4 @@
1
1
  import { MixedEegReport, IndividualEegReport } from '../objects';
2
+ export declare const EEG_REPORT_UNION_NAME = "EegReportUnion";
2
3
  export declare const EegReportUnion: IndividualEegReport | MixedEegReport;
3
4
  //# sourceMappingURL=eeg-report.union.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eeg-report.union.d.ts","sourceRoot":"","sources":["../../../src/eeg-reports/unions/eeg-report.union.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGjE,eAAO,MAAM,cAAc,sCAGzB,CAAC"}
1
+ {"version":3,"file":"eeg-report.union.d.ts","sourceRoot":"","sources":["../../../src/eeg-reports/unions/eeg-report.union.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGjE,eAAO,MAAM,qBAAqB,mBAAmB,CAAC;AAEtD,eAAO,MAAM,cAAc,sCAGzB,CAAC"}
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EegReportUnion = void 0;
3
+ exports.EegReportUnion = exports.EEG_REPORT_UNION_NAME = void 0;
4
4
  const objects_1 = require("../objects");
5
5
  const graphql_1 = require("@nestjs/graphql");
6
+ exports.EEG_REPORT_UNION_NAME = 'EegReportUnion';
6
7
  exports.EegReportUnion = (0, graphql_1.createUnionType)({
7
- name: 'EegReportUnion',
8
+ name: exports.EEG_REPORT_UNION_NAME,
8
9
  types: () => [objects_1.MixedEegReport, objects_1.IndividualEegReport],
9
10
  });
10
11
  //# sourceMappingURL=eeg-report.union.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"eeg-report.union.js","sourceRoot":"","sources":["../../../src/eeg-reports/unions/eeg-report.union.ts"],"names":[],"mappings":";;;AAAA,wCAAiE;AACjE,6CAAkD;AAErC,QAAA,cAAc,GAAG,IAAA,yBAAe,EAAC;IAC5C,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,wBAAc,EAAE,6BAAmB,CAAU;CAC5D,CAAC,CAAC"}
1
+ {"version":3,"file":"eeg-report.union.js","sourceRoot":"","sources":["../../../src/eeg-reports/unions/eeg-report.union.ts"],"names":[],"mappings":";;;AAAA,wCAAiE;AACjE,6CAAkD;AAErC,QAAA,qBAAqB,GAAG,gBAAgB,CAAC;AAEzC,QAAA,cAAc,GAAG,IAAA,yBAAe,EAAC;IAC5C,IAAI,EAAE,6BAAqB;IAC3B,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,wBAAc,EAAE,6BAAmB,CAAU;CAC5D,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './eeg-analyses';
4
4
  export * from './eeg-recordings';
5
5
  export * from './eeg-reports';
6
6
  export * from './emails';
7
+ export * from './pagination';
7
8
  export * from './subjects';
8
9
  export * from './users';
9
10
  export * from './utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -20,6 +20,7 @@ __exportStar(require("./eeg-analyses"), exports);
20
20
  __exportStar(require("./eeg-recordings"), exports);
21
21
  __exportStar(require("./eeg-reports"), exports);
22
22
  __exportStar(require("./emails"), exports);
23
+ __exportStar(require("./pagination"), exports);
23
24
  __exportStar(require("./subjects"), exports);
24
25
  __exportStar(require("./users"), exports);
25
26
  __exportStar(require("./utils"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,+CAA6B;AAC7B,iDAA+B;AAC/B,mDAAiC;AACjC,gDAA8B;AAC9B,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,+CAA6B;AAC7B,iDAA+B;AAC/B,mDAAiC;AACjC,gDAA8B;AAC9B,2CAAyB;AACzB,+CAA6B;AAC7B,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB"}
@@ -0,0 +1,2 @@
1
+ export * from './pagination.args';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pagination/args/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./pagination.args"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pagination/args/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.args.d.ts","sourceRoot":"","sources":["../../../src/pagination/args/pagination.args.ts"],"names":[],"mappings":"AAEA,qBACa,cAAc;IAIzB,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.args.js","sourceRoot":"","sources":["../../../src/pagination/args/pagination.args.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAuD;AAGhD,IAAM,cAAc,4BAApB,MAAM,cAAc;CAoB1B,CAAA;AAhBC;IAHC,IAAA,eAAK,EAAC;QACL,QAAQ,EAAE,IAAI;KACf,CAAC;;6CACa;AAKf;IAHC,IAAA,eAAK,EAAC;QACL,QAAQ,EAAE,IAAI;KACf,CAAC;;8CACc;AAKhB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,EAAE;QAChB,QAAQ,EAAE,IAAI;KACf,CAAC;;6CACa;AAKf;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,EAAE;QAChB,QAAQ,EAAE,IAAI;KACf,CAAC;;4CACY;yBAnBH,cAAc;IAD1B,IAAA,kBAAQ,GAAE;GACE,cAAc,CAoB1B"}
@@ -0,0 +1,3 @@
1
+ export * from './args';
2
+ export * from './objects';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pagination/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./args"), exports);
18
+ __exportStar(require("./objects"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pagination/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,4CAA0B"}
@@ -0,0 +1,17 @@
1
+ import { Type } from '@nestjs/common';
2
+ import { PageInfo } from './page-info.object';
3
+ export interface IEdgeType<T> {
4
+ cursor: string;
5
+ node: T;
6
+ }
7
+ export interface IConnectionType<T> {
8
+ edges: IEdgeType<T>[];
9
+ nodes: T[];
10
+ pageInfo: PageInfo;
11
+ totalCount: number;
12
+ }
13
+ /**
14
+ * Based on https://docs.nestjs.com/graphql/resolvers#generics
15
+ */
16
+ export declare function Connection<T>(classRef: Type<T>): Type<IConnectionType<T>>;
17
+ //# sourceMappingURL=connection.object-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection.object-factory.d.ts","sourceRoot":"","sources":["../../../src/pagination/objects/connection.object-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAGtC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACtB,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAwCzE"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Connection = void 0;
13
+ const graphql_1 = require("@nestjs/graphql");
14
+ const graphql_scalars_1 = require("graphql-scalars");
15
+ const page_info_object_1 = require("./page-info.object");
16
+ /**
17
+ * Based on https://docs.nestjs.com/graphql/resolvers#generics
18
+ */
19
+ function Connection(classRef) {
20
+ let EdgeType = class EdgeType {
21
+ };
22
+ __decorate([
23
+ (0, graphql_1.Field)(() => String),
24
+ __metadata("design:type", String)
25
+ ], EdgeType.prototype, "cursor", void 0);
26
+ __decorate([
27
+ (0, graphql_1.Field)(() => classRef),
28
+ __metadata("design:type", Object)
29
+ ], EdgeType.prototype, "node", void 0);
30
+ EdgeType = __decorate([
31
+ (0, graphql_1.ObjectType)(`${classRef.name}Edge`, {
32
+ isAbstract: true,
33
+ })
34
+ ], EdgeType);
35
+ let ConnectionType = class ConnectionType {
36
+ };
37
+ __decorate([
38
+ (0, graphql_1.Field)(() => [EdgeType], {
39
+ description: 'A list of edges.',
40
+ nullable: true,
41
+ }),
42
+ __metadata("design:type", Object)
43
+ ], ConnectionType.prototype, "edges", void 0);
44
+ __decorate([
45
+ (0, graphql_1.Field)(() => [classRef], {
46
+ description: 'A list of nodes.',
47
+ nullable: true,
48
+ }),
49
+ __metadata("design:type", Object)
50
+ ], ConnectionType.prototype, "nodes", void 0);
51
+ __decorate([
52
+ (0, graphql_1.Field)(() => page_info_object_1.PageInfo, {
53
+ description: 'Information to aid in pagination.',
54
+ }),
55
+ __metadata("design:type", page_info_object_1.PageInfo)
56
+ ], ConnectionType.prototype, "pageInfo", void 0);
57
+ __decorate([
58
+ (0, graphql_1.Field)(() => graphql_scalars_1.NonNegativeIntResolver, {
59
+ description: 'Identifies the total count of items in the connection.',
60
+ }),
61
+ __metadata("design:type", Number)
62
+ ], ConnectionType.prototype, "totalCount", void 0);
63
+ ConnectionType = __decorate([
64
+ (0, graphql_1.ObjectType)({
65
+ isAbstract: true,
66
+ })
67
+ ], ConnectionType);
68
+ return ConnectionType;
69
+ }
70
+ exports.Connection = Connection;
71
+ //# sourceMappingURL=connection.object-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection.object-factory.js","sourceRoot":"","sources":["../../../src/pagination/objects/connection.object-factory.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,6CAAoD;AACpD,qDAAyD;AACzD,yDAA8C;AAc9C;;GAEG;AACH,SAAgB,UAAU,CAAI,QAAiB;IAI7C,IAAe,QAAQ,GAAvB,MAAe,QAAQ;KAMtB,CAAA;IAJC;QADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;4CACL;IAGf;QADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC;;0CACd;IALK,QAAQ;QAHtB,IAAA,oBAAU,EAAC,GAAG,QAAQ,CAAC,IAAI,MAAM,EAAE;YAClC,UAAU,EAAE,IAAI;SACjB,CAAC;OACa,QAAQ,CAMtB;IAKD,IAAe,cAAc,GAA7B,MAAe,cAAc;KAsB5B,CAAA;IAjBC;QAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE;YACvB,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC;;iDACuB;IAMzB;QAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE;YACvB,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC;;iDACgB;IAKlB;QAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,2BAAQ,EAAE;YACrB,WAAW,EAAE,mCAAmC;SACjD,CAAC;kCACQ,2BAAQ;oDAAC;IAKnB;QAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,wCAAsB,EAAE;YACnC,WAAW,EAAE,wDAAwD;SACtE,CAAC;;sDACiB;IArBN,cAAc;QAH5B,IAAA,oBAAU,EAAC;YACV,UAAU,EAAE,IAAI;SACjB,CAAC;OACa,cAAc,CAsB5B;IAED,OAAO,cAA0C,CAAC;AACpD,CAAC;AAxCD,gCAwCC"}
@@ -0,0 +1,4 @@
1
+ export * from './connection.object-factory';
2
+ export * from './page-info.object';
3
+ export * from './union-connection.object-factory';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pagination/objects/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./connection.object-factory"), exports);
18
+ __exportStar(require("./page-info.object"), exports);
19
+ __exportStar(require("./union-connection.object-factory"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pagination/objects/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,qDAAmC;AACnC,oEAAkD"}
@@ -0,0 +1,7 @@
1
+ export declare class PageInfo {
2
+ endCursor: string | null;
3
+ hasNextPage: boolean;
4
+ hasPreviousPage: boolean;
5
+ startCursor: string | null;
6
+ }
7
+ //# sourceMappingURL=page-info.object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-info.object.d.ts","sourceRoot":"","sources":["../../../src/pagination/objects/page-info.object.ts"],"names":[],"mappings":"AAEA,qBACa,QAAQ;IAKnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAKzB,WAAW,EAAE,OAAO,CAAC;IAKrB,eAAe,EAAE,OAAO,CAAC;IAMzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.PageInfo = void 0;
13
+ const graphql_1 = require("@nestjs/graphql");
14
+ let PageInfo = exports.PageInfo = class PageInfo {
15
+ };
16
+ __decorate([
17
+ (0, graphql_1.Field)(() => String, {
18
+ description: 'When paginating forwards, the cursor to continue.',
19
+ nullable: true,
20
+ }),
21
+ __metadata("design:type", Object)
22
+ ], PageInfo.prototype, "endCursor", void 0);
23
+ __decorate([
24
+ (0, graphql_1.Field)({
25
+ description: 'When paginating forwards, are there more items?',
26
+ }),
27
+ __metadata("design:type", Boolean)
28
+ ], PageInfo.prototype, "hasNextPage", void 0);
29
+ __decorate([
30
+ (0, graphql_1.Field)({
31
+ description: 'When paginating backwards, are there more items?',
32
+ }),
33
+ __metadata("design:type", Boolean)
34
+ ], PageInfo.prototype, "hasPreviousPage", void 0);
35
+ __decorate([
36
+ (0, graphql_1.Field)(() => String, {
37
+ description: 'When paginating backwards, the cursor to continue.',
38
+ nullable: true,
39
+ }),
40
+ __metadata("design:type", Object)
41
+ ], PageInfo.prototype, "startCursor", void 0);
42
+ exports.PageInfo = PageInfo = __decorate([
43
+ (0, graphql_1.ObjectType)()
44
+ ], PageInfo);
45
+ //# sourceMappingURL=page-info.object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-info.object.js","sourceRoot":"","sources":["../../../src/pagination/objects/page-info.object.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAoD;AAG7C,IAAM,QAAQ,sBAAd,MAAM,QAAQ;CAsBpB,CAAA;AAjBC;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACnB,WAAW,EAAE,mDAAmD;QAChE,QAAQ,EAAE,IAAI;KACf,CAAC;;2CACuB;AAKzB;IAHC,IAAA,eAAK,EAAC;QACL,WAAW,EAAE,iDAAiD;KAC/D,CAAC;;6CACmB;AAKrB;IAHC,IAAA,eAAK,EAAC;QACL,WAAW,EAAE,kDAAkD;KAChE,CAAC;;iDACuB;AAMzB;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACnB,WAAW,EAAE,oDAAoD;QACjE,QAAQ,EAAE,IAAI;KACf,CAAC;;6CACyB;mBArBhB,QAAQ;IADpB,IAAA,oBAAU,GAAE;GACA,QAAQ,CAsBpB"}
@@ -0,0 +1,11 @@
1
+ import { Type } from '@nestjs/common';
2
+ import { Union } from '@nestjs/graphql';
3
+ import { IConnectionType } from './connection.object-factory';
4
+ /**
5
+ * Based on https://docs.nestjs.com/graphql/resolvers#generics
6
+ *
7
+ * NOTE: Duplicates Connection to handle types and union name.
8
+ * There is likely a way to merge UnionConnection and Connection.
9
+ */
10
+ export declare function UnionConnection<T extends any[]>(unionRef: Union<T>, name: string): Type<IConnectionType<Union<T>>>;
11
+ //# sourceMappingURL=union-connection.object-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"union-connection.object-factory.d.ts","sourceRoot":"","sources":["../../../src/pagination/objects/union-connection.object-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAqB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAyClH"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UnionConnection = void 0;
13
+ const graphql_1 = require("@nestjs/graphql");
14
+ const graphql_scalars_1 = require("graphql-scalars");
15
+ const page_info_object_1 = require("./page-info.object");
16
+ /**
17
+ * Based on https://docs.nestjs.com/graphql/resolvers#generics
18
+ *
19
+ * NOTE: Duplicates Connection to handle types and union name.
20
+ * There is likely a way to merge UnionConnection and Connection.
21
+ */
22
+ function UnionConnection(unionRef, name) {
23
+ let EdgeType = class EdgeType {
24
+ };
25
+ __decorate([
26
+ (0, graphql_1.Field)(() => String),
27
+ __metadata("design:type", String)
28
+ ], EdgeType.prototype, "cursor", void 0);
29
+ __decorate([
30
+ (0, graphql_1.Field)(() => unionRef),
31
+ __metadata("design:type", void 0)
32
+ ], EdgeType.prototype, "node", void 0);
33
+ EdgeType = __decorate([
34
+ (0, graphql_1.ObjectType)(`${name}Edge`, {
35
+ isAbstract: true,
36
+ })
37
+ ], EdgeType);
38
+ let ConnectionType = class ConnectionType {
39
+ };
40
+ __decorate([
41
+ (0, graphql_1.Field)(() => [EdgeType], {
42
+ description: 'A list of edges.',
43
+ nullable: true,
44
+ }),
45
+ __metadata("design:type", Array)
46
+ ], ConnectionType.prototype, "edges", void 0);
47
+ __decorate([
48
+ (0, graphql_1.Field)(() => [unionRef], {
49
+ description: 'A list of nodes.',
50
+ nullable: true,
51
+ }),
52
+ __metadata("design:type", Array)
53
+ ], ConnectionType.prototype, "nodes", void 0);
54
+ __decorate([
55
+ (0, graphql_1.Field)(() => page_info_object_1.PageInfo, {
56
+ description: 'Information to aid in pagination.',
57
+ }),
58
+ __metadata("design:type", page_info_object_1.PageInfo)
59
+ ], ConnectionType.prototype, "pageInfo", void 0);
60
+ __decorate([
61
+ (0, graphql_1.Field)(() => graphql_scalars_1.NonNegativeIntResolver, {
62
+ description: 'Identifies the total count of items in the connection.',
63
+ }),
64
+ __metadata("design:type", Number)
65
+ ], ConnectionType.prototype, "totalCount", void 0);
66
+ ConnectionType = __decorate([
67
+ (0, graphql_1.ObjectType)({
68
+ isAbstract: true,
69
+ })
70
+ ], ConnectionType);
71
+ return ConnectionType;
72
+ }
73
+ exports.UnionConnection = UnionConnection;
74
+ //# sourceMappingURL=union-connection.object-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"union-connection.object-factory.js","sourceRoot":"","sources":["../../../src/pagination/objects/union-connection.object-factory.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,6CAA2D;AAC3D,qDAAyD;AAEzD,yDAA8C;AAE9C;;;;;GAKG;AACH,SAAgB,eAAe,CAAkB,QAAkB,EAAE,IAAY;IAI/E,IAAe,QAAQ,GAAvB,MAAe,QAAQ;KAMtB,CAAA;IAJC;QADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;4CACL;IAGf;QADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC;;0CACP;IALF,QAAQ;QAHtB,IAAA,oBAAU,EAAC,GAAG,IAAI,MAAM,EAAE;YACzB,UAAU,EAAE,IAAI;SACjB,CAAC;OACa,QAAQ,CAMtB;IAKD,IAAe,cAAc,GAA7B,MAAe,cAAc;KAuB5B,CAAA;IAlBC;QAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE;YACvB,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC;;iDACiB;IAOnB;QAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE;YACvB,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,IAAI;SACR,CAAC;;iDACU;IAKnB;QAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,2BAAQ,EAAE;YACrB,WAAW,EAAE,mCAAmC;SACjD,CAAC;kCACQ,2BAAQ;oDAAC;IAKnB;QAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,wCAAsB,EAAE;YACnC,WAAW,EAAE,wDAAwD;SACtE,CAAC;;sDACiB;IAtBN,cAAc;QAH5B,IAAA,oBAAU,EAAC;YACV,UAAU,EAAE,IAAI;SACjB,CAAC;OACa,cAAc,CAuB5B;IAED,OAAO,cAAiD,CAAC;AAC3D,CAAC;AAzCD,0CAyCC"}