UNPKG

7.9 kBJavaScriptView Raw
1"use strict";
2var __extends = (this && this.__extends) || (function () {
3 var extendStatics = function (d, b) {
4 extendStatics = Object.setPrototypeOf ||
5 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7 return extendStatics(d, b);
8 }
9 return function (d, b) {
10 extendStatics(d, b);
11 function __() { this.constructor = d; }
12 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13 };
14})();
15Object.defineProperty(exports, "__esModule", { value: true });
16var oda_gen_common_1 = require("oda-gen-common");
17var lodashProps = "\nmap: Path\nkeyBy: Path\neach: LodashOperations\ntrim: DummyArgument\nstringify: DummyArgument\ntoJSON: DummyArgument\n\n# Creates an array of elements split into groups the length of size.\n# If array can't be split evenly, the final chunk will be the remaining elements.\nchunk: Int\n\n# Creates a slice of array with n elements dropped from the beginning.\ndrop: Int\n\n# Creates a slice of array with n elements dropped from the end.\ndropRight: Int\n\n# Creates a slice of array with n elements taken from the beginning.\ntake: Int\n\n# Creates a slice of array with n elements taken from the end.\ntakeRight: Int\n\n# Recursively flatten array up to depth times.\nflattenDepth: Int\n\n# The inverse of `toPairs`; this method returns an object composed from key-value\n# pairs.\nfromPairs: DummyArgument\n\n# Gets the element at index n of array. If n is negative, the nth element from\n# the end is returned.\nnth: Int\n\n# Reverses array so that the first element becomes the last, the second element\n# becomes the second to last, and so on.\nreverse: DummyArgument\n\n# Creates a duplicate-free version of an array, in which only the first occurrence\n# of each element is kept. The order of result values is determined by the order\n# they occur in the array.\nuniq: DummyArgument\n\nuniqBy: Path\n\ncountBy: Path\nfilter: JSON\nreject: JSON\nfilterIf: Predicate\nrejectIf: Predicate\ngroupBy: Path\nsortBy: [Path!]\nmatch: RegExpr\nisMatch: RegExpr\n\nminBy: Path\nmaxBy: Path\nmeanBy: Path\nsumBy: Path\n\n# Converts all elements in array into a string separated by separator.\njoin: String\n\nget: Path\n# push selected item donw to the specified path\ndive: Path\n# get all fields of specified path to current object\nassign: [Path!]\nmapValues: Path\n\nconvert: ConvertTypeArgument\n\n# Creates an array of values corresponding to paths of object.\nat: [Path!]\n# Creates an array of own enumerable string keyed-value pairs for object.\ntoPairs: DummyArgument\n\n# Creates an object composed of the inverted keys and values of object.\n# If object contains duplicate values, subsequent values overwrite property\n# assignments of previous values.\ninvert: DummyArgument\n\ninvertBy: Path\n# Creates an array of the own enumerable property names of object.\nkeys: DummyArgument\n# Creates an array of the own enumerable string keyed property values of object.\nvalues: DummyArgument\n";
18var Path = (function (_super) {
19 __extends(Path, _super);
20 function Path() {
21 var _this = _super !== null && _super.apply(this, arguments) || this;
22 _this._name = 'Path';
23 _this._resolver = {
24 Path: {
25 __serialize: String,
26 __parseValue: String,
27 __parseLiteral: function (x) { return x.value; },
28 },
29 };
30 _this._typeDef = {
31 type: [
32 "\n scalar Path\n ",
33 ],
34 };
35 return _this;
36 }
37 return Path;
38}(oda_gen_common_1.types.GQLModule));
39exports.Path = Path;
40var RegularExpression = (function (_super) {
41 __extends(RegularExpression, _super);
42 function RegularExpression() {
43 var _this = _super !== null && _super.apply(this, arguments) || this;
44 _this._name = 'RegularExpression';
45 _this._typeDef = {
46 type: [
47 "\n input RegExpr {\n match: String!\n flags: String\n }\n ",
48 ],
49 };
50 return _this;
51 }
52 return RegularExpression;
53}(oda_gen_common_1.types.GQLModule));
54exports.RegularExpression = RegularExpression;
55var Predicate = (function (_super) {
56 __extends(Predicate, _super);
57 function Predicate() {
58 var _this = _super !== null && _super.apply(this, arguments) || this;
59 _this._name = 'Predicate';
60 _this._typeDef = {
61 type: [
62 "\n input Predicate {\n lt: JSON\n lte: JSON\n gt: JSON\n gte: JSON\n eq: JSON\n startsWith: String\n endsWith: String\n and: [Predicate!]\n or: [Predicate!]\n " + lodashProps + "\n }\n ",
63 ],
64 };
65 return _this;
66 }
67 return Predicate;
68}(oda_gen_common_1.types.GQLModule));
69exports.Predicate = Predicate;
70var DirectiveLodash = (function (_super) {
71 __extends(DirectiveLodash, _super);
72 function DirectiveLodash() {
73 var _this = _super !== null && _super.apply(this, arguments) || this;
74 _this._name = 'DirectiveLodash';
75 _this._typeDef = {
76 type: [
77 "\n directive @_(\n " + lodashProps + "\n ) on FIELD | QUERY\n ",
78 ],
79 };
80 return _this;
81 }
82 return DirectiveLodash;
83}(oda_gen_common_1.types.GQLModule));
84exports.DirectiveLodash = DirectiveLodash;
85var LodashOperations = (function (_super) {
86 __extends(LodashOperations, _super);
87 function LodashOperations() {
88 var _this = _super !== null && _super.apply(this, arguments) || this;
89 _this._name = 'LodashOperations';
90 _this._typeDef = {
91 type: [
92 "\n input LodashOperations {\n " + lodashProps + "\n }\n ",
93 ],
94 };
95 return _this;
96 }
97 return LodashOperations;
98}(oda_gen_common_1.types.GQLModule));
99exports.LodashOperations = LodashOperations;
100var DummyArgument = (function (_super) {
101 __extends(DummyArgument, _super);
102 function DummyArgument() {
103 var _this = _super !== null && _super.apply(this, arguments) || this;
104 _this._name = 'DummyArgument';
105 _this._typeDef = {
106 type: [
107 "\n enum DummyArgument{\n none\n }\n ",
108 ],
109 };
110 return _this;
111 }
112 return DummyArgument;
113}(oda_gen_common_1.types.GQLModule));
114exports.DummyArgument = DummyArgument;
115var ConvertTypeArgument = (function (_super) {
116 __extends(ConvertTypeArgument, _super);
117 function ConvertTypeArgument() {
118 var _this = _super !== null && _super.apply(this, arguments) || this;
119 _this._name = 'ConvertTypeArgument';
120 _this._typeDef = {
121 type: [
122 "\n enum ConvertTypeArgument{\n toNumber\n toString\n }\n ",
123 ],
124 };
125 return _this;
126 }
127 return ConvertTypeArgument;
128}(oda_gen_common_1.types.GQLModule));
129exports.ConvertTypeArgument = ConvertTypeArgument;
130var LodashModule = (function (_super) {
131 __extends(LodashModule, _super);
132 function LodashModule() {
133 var _this = _super !== null && _super.apply(this, arguments) || this;
134 _this._name = 'LodashModule';
135 _this._composite = [
136 new RegularExpression({}),
137 new Path({}),
138 new Predicate({}),
139 new DirectiveLodash({}),
140 new LodashOperations({}),
141 new DummyArgument({}),
142 new ConvertTypeArgument({}),
143 ];
144 return _this;
145 }
146 return LodashModule;
147}(oda_gen_common_1.types.GQLModule));
148exports.LodashModule = LodashModule;
149//# sourceMappingURL=lodash.js.map
\No newline at end of file