@conduitplatform/grpc-sdk 0.16.0-alpha.2 → 0.16.0-alpha.20

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 (225) hide show
  1. package/README.mdx +1 -7
  2. package/dist/classes/ConduitModule.d.ts +9 -6
  3. package/dist/classes/ConduitModule.js +85 -48
  4. package/dist/classes/ConduitModule.js.map +1 -1
  5. package/dist/classes/ConduitSchema.js.map +1 -1
  6. package/dist/classes/HealthCheck.js +36 -9
  7. package/dist/classes/HealthCheck.js.map +1 -1
  8. package/dist/classes/index.d.ts +2 -6
  9. package/dist/classes/index.js +2 -6
  10. package/dist/classes/index.js.map +1 -1
  11. package/dist/index.d.ts +34 -31
  12. package/dist/index.js +181 -176
  13. package/dist/index.js.map +1 -1
  14. package/dist/interceptors/grpcSignedToken.d.ts +1 -1
  15. package/dist/interceptors/grpcSignedToken.js +2 -2
  16. package/dist/interceptors/moduleName.d.ts +1 -1
  17. package/dist/interceptors/moduleName.js +2 -2
  18. package/dist/interfaces/ConduitMiddleware.js.map +1 -0
  19. package/dist/{routing/interfaces → interfaces}/ConduitRoute.d.ts +2 -3
  20. package/dist/interfaces/ConduitRoute.js.map +1 -0
  21. package/dist/{routing → interfaces}/ConduitRouteReturn.d.ts +3 -3
  22. package/dist/interfaces/ConduitRouteReturn.js.map +1 -0
  23. package/dist/interfaces/ConduitSchemaExtension.d.ts +1 -1
  24. package/dist/interfaces/GrpcCallback.d.ts +1 -1
  25. package/dist/{utilities/Logger.d.ts → interfaces/IConduitLogger.d.ts} +4 -7
  26. package/dist/interfaces/{ConduitService.js → IConduitLogger.js} +1 -1
  27. package/dist/interfaces/IConduitLogger.js.map +1 -0
  28. package/dist/{metrics/index.d.ts → interfaces/IConduitMetrics.d.ts} +5 -11
  29. package/dist/interfaces/IConduitMetrics.js +3 -0
  30. package/dist/interfaces/IConduitMetrics.js.map +1 -0
  31. package/dist/interfaces/Indexable.d.ts +7 -8
  32. package/dist/interfaces/Model.d.ts +66 -13
  33. package/dist/interfaces/Model.js.map +1 -1
  34. package/dist/interfaces/Params.d.ts +3 -3
  35. package/dist/interfaces/ProxyRoute.js.map +1 -0
  36. package/dist/interfaces/RawQuery.d.ts +2 -2
  37. package/dist/interfaces/Route.d.ts +64 -0
  38. package/dist/interfaces/Route.js +12 -0
  39. package/dist/interfaces/Route.js.map +1 -0
  40. package/dist/{routing/interfaces → interfaces}/Socket.d.ts +4 -5
  41. package/dist/interfaces/Socket.js.map +1 -0
  42. package/dist/interfaces/UntypedArray.d.ts +1 -1
  43. package/dist/interfaces/index.d.ts +9 -2
  44. package/dist/interfaces/index.js +9 -2
  45. package/dist/interfaces/index.js.map +1 -1
  46. package/dist/{routing/interfaces → interfaces}/types.d.ts +11 -9
  47. package/dist/{routing/interfaces → interfaces}/types.js.map +1 -1
  48. package/dist/module.proto +72 -0
  49. package/dist/modules/admin/index.d.ts +5 -5
  50. package/dist/modules/admin/index.js +12 -13
  51. package/dist/modules/admin/index.js.map +1 -1
  52. package/dist/modules/authentication/index.d.ts +5 -2
  53. package/dist/modules/authentication/index.js +14 -4
  54. package/dist/modules/authentication/index.js.map +1 -1
  55. package/dist/modules/authorization/index.d.ts +5 -2
  56. package/dist/modules/authorization/index.js +10 -4
  57. package/dist/modules/authorization/index.js.map +1 -1
  58. package/dist/modules/config/index.d.ts +5 -5
  59. package/dist/modules/config/index.js +38 -28
  60. package/dist/modules/config/index.js.map +1 -1
  61. package/dist/modules/database/index.d.ts +24 -14
  62. package/dist/modules/database/index.js +127 -28
  63. package/dist/modules/database/index.js.map +1 -1
  64. package/dist/modules/index.d.ts +0 -2
  65. package/dist/modules/index.js +0 -2
  66. package/dist/modules/index.js.map +1 -1
  67. package/dist/modules/router/index.d.ts +5 -5
  68. package/dist/modules/router/index.js +10 -11
  69. package/dist/modules/router/index.js.map +1 -1
  70. package/dist/modules/storage/index.d.ts +8 -4
  71. package/dist/modules/storage/index.js +55 -6
  72. package/dist/modules/storage/index.js.map +1 -1
  73. package/dist/protoUtils/authentication.d.ts +127 -46
  74. package/dist/protoUtils/authentication.js +301 -72
  75. package/dist/protoUtils/authentication.js.map +1 -1
  76. package/dist/protoUtils/authorization.d.ts +112 -82
  77. package/dist/protoUtils/authorization.js +285 -159
  78. package/dist/protoUtils/authorization.js.map +1 -1
  79. package/dist/protoUtils/chat.d.ts +7 -61
  80. package/dist/protoUtils/chat.js +3 -149
  81. package/dist/protoUtils/chat.js.map +1 -1
  82. package/dist/protoUtils/core.d.ts +85 -107
  83. package/dist/protoUtils/core.js +101 -203
  84. package/dist/protoUtils/core.js.map +1 -1
  85. package/dist/protoUtils/database.d.ts +195 -15
  86. package/dist/protoUtils/database.js +444 -33
  87. package/dist/protoUtils/database.js.map +1 -1
  88. package/dist/protoUtils/email.d.ts +3 -48
  89. package/dist/protoUtils/email.js +1 -110
  90. package/dist/protoUtils/email.js.map +1 -1
  91. package/dist/protoUtils/google/protobuf/empty.d.ts +27 -0
  92. package/dist/protoUtils/google/protobuf/empty.js +47 -0
  93. package/dist/protoUtils/google/protobuf/empty.js.map +1 -0
  94. package/dist/protoUtils/grpc_health_check.d.ts +3 -4
  95. package/dist/protoUtils/grpc_health_check.js +1 -2
  96. package/dist/protoUtils/grpc_health_check.js.map +1 -1
  97. package/dist/protoUtils/index.d.ts +12 -0
  98. package/dist/{routing/interfaces → protoUtils}/index.js +12 -6
  99. package/dist/protoUtils/index.js.map +1 -0
  100. package/dist/protoUtils/module.d.ts +251 -0
  101. package/dist/protoUtils/module.js +882 -0
  102. package/dist/protoUtils/module.js.map +1 -0
  103. package/dist/protoUtils/push-notifications.d.ts +7 -50
  104. package/dist/protoUtils/push-notifications.js +51 -120
  105. package/dist/protoUtils/push-notifications.js.map +1 -1
  106. package/dist/protoUtils/router.d.ts +45 -111
  107. package/dist/protoUtils/router.js +100 -310
  108. package/dist/protoUtils/router.js.map +1 -1
  109. package/dist/protoUtils/sms.d.ts +3 -48
  110. package/dist/protoUtils/sms.js +1 -110
  111. package/dist/protoUtils/sms.js.map +1 -1
  112. package/dist/protoUtils/storage.d.ts +144 -62
  113. package/dist/protoUtils/storage.js +594 -173
  114. package/dist/protoUtils/storage.js.map +1 -1
  115. package/dist/types/db.d.ts +11 -11
  116. package/dist/types/index.d.ts +3 -10
  117. package/dist/types/index.js +15 -0
  118. package/dist/types/index.js.map +1 -1
  119. package/dist/utilities/EventBus.d.ts +3 -1
  120. package/dist/utilities/EventBus.js +39 -1
  121. package/dist/utilities/EventBus.js.map +1 -1
  122. package/dist/utilities/RedisManager.js.map +1 -1
  123. package/dist/utilities/index.d.ts +3 -2
  124. package/dist/utilities/index.js +3 -2
  125. package/dist/utilities/index.js.map +1 -1
  126. package/package.json +24 -25
  127. package/dist/classes/ConduitActiveSchema.d.ts +0 -19
  128. package/dist/classes/ConduitActiveSchema.js +0 -57
  129. package/dist/classes/ConduitActiveSchema.js.map +0 -1
  130. package/dist/classes/ConduitServiceModule.d.ts +0 -26
  131. package/dist/classes/ConduitServiceModule.js +0 -166
  132. package/dist/classes/ConduitServiceModule.js.map +0 -1
  133. package/dist/classes/ConfigController.d.ts +0 -7
  134. package/dist/classes/ConfigController.js +0 -27
  135. package/dist/classes/ConfigController.js.map +0 -1
  136. package/dist/classes/GrpcServer.d.ts +0 -22
  137. package/dist/classes/GrpcServer.js +0 -207
  138. package/dist/classes/GrpcServer.js.map +0 -1
  139. package/dist/classes/ManagedModule.d.ts +0 -74
  140. package/dist/classes/ManagedModule.js +0 -333
  141. package/dist/classes/ManagedModule.js.map +0 -1
  142. package/dist/classes/ModuleManager.d.ts +0 -11
  143. package/dist/classes/ModuleManager.js +0 -204
  144. package/dist/classes/ModuleManager.js.map +0 -1
  145. package/dist/helpers/GrpcHelper.d.ts +0 -8
  146. package/dist/helpers/GrpcHelper.js +0 -43
  147. package/dist/helpers/GrpcHelper.js.map +0 -1
  148. package/dist/helpers/TypeHelpers.d.ts +0 -44
  149. package/dist/helpers/TypeHelpers.js +0 -144
  150. package/dist/helpers/TypeHelpers.js.map +0 -1
  151. package/dist/helpers/index.d.ts +0 -3
  152. package/dist/helpers/index.js +0 -20
  153. package/dist/helpers/index.js.map +0 -1
  154. package/dist/helpers/wrapGrpcFunctions.d.ts +0 -5
  155. package/dist/helpers/wrapGrpcFunctions.js +0 -56
  156. package/dist/helpers/wrapGrpcFunctions.js.map +0 -1
  157. package/dist/interfaces/ConduitService.d.ts +0 -8
  158. package/dist/interfaces/ConduitService.js.map +0 -1
  159. package/dist/metrics/MetricsServer.d.ts +0 -9
  160. package/dist/metrics/MetricsServer.js +0 -94
  161. package/dist/metrics/MetricsServer.js.map +0 -1
  162. package/dist/metrics/clientMiddleware.d.ts +0 -2
  163. package/dist/metrics/clientMiddleware.js +0 -265
  164. package/dist/metrics/clientMiddleware.js.map +0 -1
  165. package/dist/metrics/config/defaults.d.ts +0 -91
  166. package/dist/metrics/config/defaults.js +0 -93
  167. package/dist/metrics/config/defaults.js.map +0 -1
  168. package/dist/metrics/index.js +0 -152
  169. package/dist/metrics/index.js.map +0 -1
  170. package/dist/modules/forms/index.d.ts +0 -6
  171. package/dist/modules/forms/index.js +0 -32
  172. package/dist/modules/forms/index.js.map +0 -1
  173. package/dist/modules/functions/index.d.ts +0 -6
  174. package/dist/modules/functions/index.js +0 -32
  175. package/dist/modules/functions/index.js.map +0 -1
  176. package/dist/protoUtils/forms.d.ts +0 -58
  177. package/dist/protoUtils/forms.js +0 -127
  178. package/dist/protoUtils/forms.js.map +0 -1
  179. package/dist/protoUtils/functions.d.ts +0 -58
  180. package/dist/protoUtils/functions.js +0 -127
  181. package/dist/protoUtils/functions.js.map +0 -1
  182. package/dist/routing/ConduitRouteReturn.js.map +0 -1
  183. package/dist/routing/ProxyRouteBuilder.d.ts +0 -21
  184. package/dist/routing/ProxyRouteBuilder.js +0 -81
  185. package/dist/routing/ProxyRouteBuilder.js.map +0 -1
  186. package/dist/routing/RouteBuilder.d.ts +0 -24
  187. package/dist/routing/RouteBuilder.js +0 -107
  188. package/dist/routing/RouteBuilder.js.map +0 -1
  189. package/dist/routing/RoutingManager.d.ts +0 -33
  190. package/dist/routing/RoutingManager.js +0 -201
  191. package/dist/routing/RoutingManager.js.map +0 -1
  192. package/dist/routing/RoutingUtilities.d.ts +0 -7
  193. package/dist/routing/RoutingUtilities.js +0 -13
  194. package/dist/routing/RoutingUtilities.js.map +0 -1
  195. package/dist/routing/index.d.ts +0 -7
  196. package/dist/routing/index.js +0 -24
  197. package/dist/routing/index.js.map +0 -1
  198. package/dist/routing/interfaces/ConduitMiddleware.js.map +0 -1
  199. package/dist/routing/interfaces/ConduitRoute.js.map +0 -1
  200. package/dist/routing/interfaces/ProxyRoute.js.map +0 -1
  201. package/dist/routing/interfaces/Route.d.ts +0 -52
  202. package/dist/routing/interfaces/Route.js +0 -21
  203. package/dist/routing/interfaces/Route.js.map +0 -1
  204. package/dist/routing/interfaces/Socket.js.map +0 -1
  205. package/dist/routing/interfaces/index.d.ts +0 -6
  206. package/dist/routing/interfaces/index.js.map +0 -1
  207. package/dist/routing/wrapRouterFunctions.d.ts +0 -8
  208. package/dist/routing/wrapRouterFunctions.js +0 -132
  209. package/dist/routing/wrapRouterFunctions.js.map +0 -1
  210. package/dist/utilities/Logger.js +0 -255
  211. package/dist/utilities/Logger.js.map +0 -1
  212. package/dist/utilities/linearBackoffTimeout.d.ts +0 -10
  213. package/dist/utilities/linearBackoffTimeout.js +0 -119
  214. package/dist/utilities/linearBackoffTimeout.js.map +0 -1
  215. package/dist/utilities/merge.d.ts +0 -1
  216. package/dist/utilities/merge.js +0 -15
  217. package/dist/utilities/merge.js.map +0 -1
  218. /package/dist/{routing/interfaces → interfaces}/ConduitMiddleware.d.ts +0 -0
  219. /package/dist/{routing/interfaces → interfaces}/ConduitMiddleware.js +0 -0
  220. /package/dist/{routing/interfaces → interfaces}/ConduitRoute.js +0 -0
  221. /package/dist/{routing → interfaces}/ConduitRouteReturn.js +0 -0
  222. /package/dist/{routing/interfaces → interfaces}/ProxyRoute.d.ts +0 -0
  223. /package/dist/{routing/interfaces → interfaces}/ProxyRoute.js +0 -0
  224. /package/dist/{routing/interfaces → interfaces}/Socket.js +0 -0
  225. /package/dist/{routing/interfaces → interfaces}/types.js +0 -0
@@ -1,8 +1,7 @@
1
- import { ConduitRouteReturnDefinition } from '../ConduitRouteReturn';
1
+ import { ConduitRouteReturnDefinition } from './ConduitRouteReturn';
2
2
  import { ConduitRouteOptions } from './Route';
3
- import { RequestHandlers } from '../wrapRouterFunctions';
4
3
  export interface ConduitRoute {
5
4
  returnType: ConduitRouteReturnDefinition;
6
5
  input: ConduitRouteOptions;
7
- handler: RequestHandlers;
6
+ handler: any;
8
7
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConduitRoute.js","sourceRoot":"","sources":["../../src/interfaces/ConduitRoute.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { ConduitModel } from '../interfaces';
1
+ import { ConduitReturn } from './Route';
2
2
  /**
3
3
  * Supports:
4
4
  * {
@@ -42,7 +42,7 @@ import { ConduitModel } from '../interfaces';
42
42
  export declare class ConduitRouteReturnDefinition {
43
43
  private readonly _name;
44
44
  private readonly _fields;
45
- constructor(name: string, fields?: ConduitModel | string);
45
+ constructor(name: string, fields?: ConduitReturn);
46
46
  get name(): string;
47
- get fields(): ConduitModel | string;
47
+ get fields(): ConduitReturn;
48
48
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConduitRouteReturn.js","sourceRoot":"","sources":["../../src/interfaces/ConduitRouteReturn.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH;IAIE,4BAA4B;IAC5B,qBAAqB;IACrB,kDAAkD;IAClD,qCAAqC;IAErC,sCAAY,IAAY,EAAE,MAAsB;QAC9C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,QAAQ;QACR,sGAAsG;QACtG,6EAA6E;QAC7E,4EAA4E;QAC5E,IAAI,CAAC,OAAO,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI,CAAC;IAChC,CAAC;IAED,sBAAI,8CAAI;aAAR;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;;;OAAA;IAED,sBAAI,gDAAM;aAAV;YACE,OAAO,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC;;;OAAA;IACH,mCAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,oEAA4B"}
@@ -1,4 +1,4 @@
1
- import { ConduitModel } from '.';
1
+ import { ConduitModel } from './Model';
2
2
  export interface ConduitSchemaExtension {
3
3
  readonly schemaName: string;
4
4
  readonly fields: ConduitModel;
@@ -1,4 +1,4 @@
1
- export declare type GrpcCallback<ResponseType> = (error: {
1
+ export type GrpcCallback<ResponseType> = (error: {
2
2
  code: number;
3
3
  message: string;
4
4
  } | null, response?: ResponseType) => void;
@@ -1,9 +1,7 @@
1
- import { Indexable } from '../interfaces';
2
1
  import winston, { LogCallback, Logger } from 'winston';
3
- export declare class ConduitLogger {
4
- private readonly _winston;
5
- constructor(transports?: winston.transport[]);
6
- addTransport(transport: winston.transport): void;
2
+ import { Indexable } from './Indexable';
3
+ export interface IConduitLogger {
4
+ get winston(): winston.Logger;
7
5
  log(message: string, level?: string, cb?: LogCallback): Logger;
8
6
  logObject(object: Indexable, message?: string, level?: string, cb?: LogCallback): Logger;
9
7
  info(message: string, cb?: LogCallback): Logger;
@@ -11,6 +9,5 @@ export declare class ConduitLogger {
11
9
  error(message: string | Error, cb?: LogCallback): Logger;
12
10
  http(message: string, cb?: LogCallback): Logger;
13
11
  verbose(message: string, cb?: LogCallback): Logger;
14
- get winston(): winston.Logger;
12
+ addTransport(transport: winston.transport): void;
15
13
  }
16
- export declare function setupLoki(module: string, instance: string): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ConduitService.js.map
3
+ //# sourceMappingURL=IConduitLogger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IConduitLogger.js","sourceRoot":"","sources":["../../src/interfaces/IConduitLogger.ts"],"names":[],"mappings":""}
@@ -1,22 +1,16 @@
1
- import { Counter, CounterConfiguration, Gauge, GaugeConfiguration, Histogram, HistogramConfiguration, LabelValues, Summary, SummaryConfiguration } from 'prom-client';
2
- import { MetricConfiguration, MetricType } from '../types';
3
- export declare class ConduitMetrics {
4
- private readonly moduleName;
5
- private readonly instance;
6
- private readonly _registry;
7
- private _httpServer;
8
- constructor(moduleName: string, instance: string);
1
+ import { Counter, CounterConfiguration, Gauge, GaugeConfiguration, Histogram, HistogramConfiguration, LabelValues, Metric, MetricConfiguration, Summary, SummaryConfiguration } from 'prom-client';
2
+ import { MetricType } from '../types';
3
+ export interface IConduitMetrics {
9
4
  initializeDefaultMetrics(): void;
10
- registerMetric(type: MetricType, config: MetricConfiguration): void;
5
+ registerMetric(type: MetricType, config: MetricConfiguration<string>): void;
11
6
  collectDefaultMetrics(): void;
12
7
  createCounter(config: CounterConfiguration<any>): Counter<any>;
13
8
  createSummary(config: SummaryConfiguration<any>): Summary<any>;
14
9
  createHistogram(config: HistogramConfiguration<any>): Histogram<any>;
15
10
  createGauge(config: GaugeConfiguration<any>): Gauge<any>;
16
- getMetric(name: string): import("prom-client").Metric<string> | undefined;
11
+ getMetric(name: string): Metric<string> | undefined;
17
12
  increment(metric: string, increment?: number, labels?: LabelValues<any>): void;
18
13
  decrement(metric: string, decrement?: number, labels?: LabelValues<any>): void;
19
14
  set(metric: string, value: number, labels?: LabelValues<any>): void;
20
15
  observe(metric: string, value: number, labels?: LabelValues<any>): void;
21
- private addPrefix;
22
16
  }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IConduitMetrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IConduitMetrics.js","sourceRoot":"","sources":["../../src/interfaces/IConduitMetrics.ts"],"names":[],"mappings":""}
@@ -1,10 +1,9 @@
1
- export declare type Indexable = {
1
+ export type Indexable = {
2
2
  [key: string]: any;
3
3
  };
4
- export declare type Params = Indexable;
5
- export declare type Document = Indexable;
6
- export declare type Route = Indexable;
7
- export declare type Headers = Indexable;
8
- export declare type Context = Indexable;
9
- export declare type Cookies = Indexable;
10
- export declare type Query = Indexable;
4
+ export type Params = Indexable;
5
+ export type Document = Indexable;
6
+ export type Route = Indexable;
7
+ export type Headers = Indexable;
8
+ export type Context = Indexable;
9
+ export type Cookies = Indexable;
@@ -1,4 +1,3 @@
1
- import { UntypedArray } from './UntypedArray';
2
1
  export declare enum TYPE {
3
2
  String = "String",
4
3
  Number = "Number",
@@ -38,23 +37,73 @@ export declare enum PostgresIndexType {
38
37
  GIN = "GIN",
39
38
  BRIN = "BRIN"
40
39
  }
41
- export declare type Array = any[];
42
- export interface ConduitModelField {
43
- type?: TYPE | Array | ConduitModel | ConduitModelField;
40
+ export type Array = any[];
41
+ type BaseConduitModelField = {
42
+ type?: TYPE | TYPE[] | ConduitModel | ArrayConduitModel[];
44
43
  sqlType?: SQLDataType;
45
- enum?: any;
46
44
  default?: any;
47
- model?: string;
48
- unique?: boolean;
45
+ description?: string;
46
+ required?: boolean;
49
47
  select?: boolean;
48
+ };
49
+ type UniqueAndRequiredField = {
50
+ unique: true;
51
+ required: true;
52
+ index?: SchemaFieldIndex;
53
+ };
54
+ type NotUniqueField = {
55
+ unique?: false;
50
56
  required?: boolean;
51
- description?: string;
52
- systemRequired?: boolean;
53
57
  index?: SchemaFieldIndex;
54
- }
55
- export interface ConduitModel {
56
- [field: string]: ConduitModelField | ConduitModelField[] | ConduitModel | TYPE | TYPE[] | UntypedArray;
57
- }
58
+ };
59
+ export type BasicConduitModelField = BaseConduitModelField & (UniqueAndRequiredField | NotUniqueField);
60
+ export type ConduitModelFieldRelation = BasicConduitModelField & {
61
+ type: TYPE.Relation | TYPE.Relation[];
62
+ model: string;
63
+ };
64
+ export type ConduitModelFieldJSON = BasicConduitModelField & {
65
+ type: TYPE.JSON | TYPE.JSON[];
66
+ };
67
+ export type ConduitModelFieldEnum = BasicConduitModelField & {
68
+ type: ExcludeJSONRelation<TYPE> | ExcludeJSONRelation<TYPE>[];
69
+ enum: any;
70
+ };
71
+ export type ConduitModelField = BasicConduitModelField & {
72
+ type?: ExcludeJSONRelation<TYPE> | ExcludeJSONRelation<TYPE>[] | ConduitModel | ArrayConduitModel[];
73
+ };
74
+ export type allowedTypes = ExcludeRelation<TYPE> | ConduitModelField | ConduitModelFieldEnum | ConduitModelFieldJSON | ConduitModelFieldRelation;
75
+ type embeddableArray = ExcludeRelation<TYPE> | ConduitModelField | ConduitModelFieldEnum | ConduitModelFieldJSON;
76
+ type ExcludeRelation<T> = T extends TYPE.Relation ? never : T;
77
+ type ExcludeJSON<T> = T extends TYPE.JSON ? never : T;
78
+ type ExcludeJSONRelation<T> = ExcludeJSON<ExcludeRelation<T>>;
79
+ export type ArrayConduitModel = {
80
+ type?: never;
81
+ sqlType?: never;
82
+ default?: never;
83
+ description?: never;
84
+ required?: never;
85
+ select?: never;
86
+ unique?: never;
87
+ index?: never;
88
+ enum?: never;
89
+ model?: never;
90
+ } & {
91
+ [field in string]: embeddableArray | embeddableArray[];
92
+ };
93
+ export type ConduitModel = {
94
+ type?: never;
95
+ sqlType?: never;
96
+ default?: never;
97
+ description?: never;
98
+ required?: never;
99
+ select?: never;
100
+ unique?: never;
101
+ index?: never;
102
+ enum?: never;
103
+ model?: never;
104
+ } & {
105
+ [field in string]: allowedTypes | allowedTypes[] | ConduitModel;
106
+ };
58
107
  export declare const ConduitModelOptionsPermModifyType: string[];
59
108
  export interface ConduitSchemaOptions {
60
109
  timestamps?: boolean;
@@ -67,6 +116,9 @@ export interface ConduitSchemaOptions {
67
116
  canModify: 'Everything' | 'Nothing' | 'ExtensionOnly';
68
117
  canDelete: boolean;
69
118
  };
119
+ authorization?: {
120
+ enabled: boolean;
121
+ };
70
122
  };
71
123
  indexes?: ModelOptionsIndexes[];
72
124
  }
@@ -115,3 +167,4 @@ export interface PostgresIndexOptions {
115
167
  [opt: string]: any;
116
168
  };
117
169
  }
170
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Model.js","sourceRoot":"","sources":["../../src/interfaces/Model.ts"],"names":[],"mappings":";;;AAEA,IAAY,IAQX;AARD,WAAY,IAAI;IACd,yBAAiB,CAAA;IACjB,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IACnB,qBAAa,CAAA;IACb,6BAAqB,CAAA;IACrB,qBAAa,CAAA;IACb,6BAAqB,CAAA;AACvB,CAAC,EARW,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAQf;AAED,IAAY,WAYX;AAZD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,oCAAqB,CAAA;IACrB,sCAAuB,CAAA;AACzB,CAAC,EAZW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAYtB;AAED,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,6DAAa,CAAA;IACb,gEAAe,CAAA;IACf,qCAAmB,CAAA;IACnB,iDAA+B,CAAA;IAC/B,6CAA2B,CAAA;IAC3B,mCAAiB,CAAA;IACjB,+BAAa,CAAA;AACf,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB;AAED,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,oCAAe,CAAA;IACf,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,gCAAW,CAAA;IACX,kCAAa,CAAA;AACf,CAAC,EAPW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAO5B;AA4BY,QAAA,iCAAiC,GAAG;IAC/C,YAAY;IACZ,SAAS;IACT,eAAe;CAChB,CAAC"}
1
+ {"version":3,"file":"Model.js","sourceRoot":"","sources":["../../src/interfaces/Model.ts"],"names":[],"mappings":";;;AAAA,IAAY,IAQX;AARD,WAAY,IAAI;IACd,yBAAiB,CAAA;IACjB,yBAAiB,CAAA;IACjB,2BAAmB,CAAA;IACnB,qBAAa,CAAA;IACb,6BAAqB,CAAA;IACrB,qBAAa,CAAA;IACb,6BAAqB,CAAA;AACvB,CAAC,EARW,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAQf;AAED,IAAY,WAYX;AAZD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,oCAAqB,CAAA;IACrB,sCAAuB,CAAA;AACzB,CAAC,EAZW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAYtB;AAED,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,6DAAa,CAAA;IACb,gEAAe,CAAA;IACf,qCAAmB,CAAA;IACnB,iDAA+B,CAAA;IAC/B,6CAA2B,CAAA;IAC3B,mCAAiB,CAAA;IACjB,+BAAa,CAAA;AACf,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB;AAED,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,oCAAe,CAAA;IACf,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,gCAAW,CAAA;IACX,kCAAa,CAAA;AACf,CAAC,EAPW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAO5B;AAkGY,QAAA,iCAAiC,GAAG;IAC/C,YAAY;IACZ,SAAS;IACT,eAAe;CAChB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { Indexable } from './Indexable';
2
- export declare type UrlParams = {
2
+ export type UrlParams = {
3
3
  [key: string]: string;
4
4
  };
5
- export declare type QueryParams = {
5
+ export type QueryParams = {
6
6
  [key: string]: string | string[];
7
7
  };
8
- export declare type BodyParams = Indexable;
8
+ export type BodyParams = Indexable;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProxyRoute.js","sourceRoot":"","sources":["../../src/interfaces/ProxyRoute.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,gCAAW,CAAA;IACX,kCAAa,CAAA;IACb,mCAAc,CAAA;IACd,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,gCAAW,CAAA;AACb,CAAC,EAPW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAO5B"}
@@ -2,7 +2,7 @@ export interface RawQuery {
2
2
  mongoQuery?: RawMongoQuery;
3
3
  sqlQuery?: RawSQLQuery;
4
4
  }
5
- export declare type RawMongoQuery = {
5
+ export type RawMongoQuery = {
6
6
  aggregate?: object[];
7
7
  count?: object;
8
8
  deleteOne?: object;
@@ -16,7 +16,7 @@ export declare type RawMongoQuery = {
16
16
  updateMany?: object | object[];
17
17
  options?: object;
18
18
  };
19
- export declare type RawSQLQuery = {
19
+ export type RawSQLQuery = {
20
20
  query: string;
21
21
  options?: object;
22
22
  };
@@ -0,0 +1,64 @@
1
+ import { allowedTypes, ConduitModel, TYPE } from './Model';
2
+ import { Indexable } from './Indexable';
3
+ export interface ConduitRouteParameters {
4
+ params?: Indexable;
5
+ path?: string;
6
+ headers: Indexable;
7
+ context?: Indexable;
8
+ cookies?: Indexable;
9
+ bodyParams?: Indexable;
10
+ urlParams?: Indexable;
11
+ queryParams?: Indexable;
12
+ }
13
+ type AllowedTypes = TYPE.String | TYPE.Number | TYPE.Boolean | TYPE.Date | TYPE.ObjectId;
14
+ export type ConduitUrlParam = AllowedTypes | {
15
+ type: AllowedTypes;
16
+ required?: boolean;
17
+ };
18
+ export type ConduitQueryParam = ConduitUrlParam | AllowedTypes[] | {
19
+ type: AllowedTypes[];
20
+ required: boolean;
21
+ } | {
22
+ type: AllowedTypes;
23
+ required?: boolean;
24
+ }[];
25
+ export type ConduitUrlParams = {
26
+ [field in string]: ConduitUrlParam;
27
+ };
28
+ export type ConduitQueryParams = {
29
+ [field in string]: ConduitQueryParam;
30
+ };
31
+ export type ConduitReturnField = keyof typeof TYPE | TYPE | ConduitModel | {
32
+ [key: string]: TYPE | TYPE[] | ConduitModel | ConduitModel[];
33
+ };
34
+ export type ConduitReturnModel = {
35
+ [field: string]: ConduitReturnField | allowedTypes | allowedTypes[] | string | string[];
36
+ };
37
+ export type ConduitReturn = ConduitReturnField | ConduitReturnModel | string;
38
+ export declare enum ConduitRouteActions {
39
+ GET = "GET",
40
+ POST = "POST",
41
+ UPDATE = "PUT",
42
+ PATCH = "PATCH",
43
+ DELETE = "DELETE"
44
+ }
45
+ export interface ConduitRouteOptions {
46
+ queryParams?: ConduitQueryParams;
47
+ bodyParams?: ConduitModel;
48
+ urlParams?: ConduitUrlParams;
49
+ action: ConduitRouteActions;
50
+ path: string;
51
+ name?: string;
52
+ description?: string;
53
+ middlewares?: string[];
54
+ cacheControl?: string;
55
+ }
56
+ export interface ConduitRouteObject {
57
+ options: ConduitRouteOptions;
58
+ returns: {
59
+ name: string;
60
+ fields: ConduitReturn;
61
+ };
62
+ grpcFunction: string;
63
+ }
64
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConduitRouteActions = void 0;
4
+ var ConduitRouteActions;
5
+ (function (ConduitRouteActions) {
6
+ ConduitRouteActions["GET"] = "GET";
7
+ ConduitRouteActions["POST"] = "POST";
8
+ ConduitRouteActions["UPDATE"] = "PUT";
9
+ ConduitRouteActions["PATCH"] = "PATCH";
10
+ ConduitRouteActions["DELETE"] = "DELETE";
11
+ })(ConduitRouteActions = exports.ConduitRouteActions || (exports.ConduitRouteActions = {}));
12
+ //# sourceMappingURL=Route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Route.js","sourceRoot":"","sources":["../../src/interfaces/Route.ts"],"names":[],"mappings":";;;AA6CA,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,qCAAc,CAAA;IACd,sCAAe,CAAA;IACf,wCAAiB,CAAA;AACnB,CAAC,EANW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAM9B"}
@@ -1,7 +1,6 @@
1
- import { ConduitRouteReturnDefinition } from '../ConduitRouteReturn';
2
- import { RequestHandlers } from '../wrapRouterFunctions';
3
- import { TYPE } from '../../interfaces';
4
- export declare type ConduitSocketParamTypes = (TYPE | ConduitSocketParamTypes)[];
1
+ import { ConduitRouteReturnDefinition } from './ConduitRouteReturn';
2
+ import { TYPE } from './Model';
3
+ export type ConduitSocketParamTypes = (TYPE | ConduitSocketParamTypes)[];
5
4
  export interface ConduitSocketOptions {
6
5
  path: string;
7
6
  name?: string;
@@ -11,7 +10,7 @@ export interface ConduitSocketOptions {
11
10
  export interface ConduitSocketEventHandler {
12
11
  params?: ConduitSocketParamTypes;
13
12
  returnType?: ConduitRouteReturnDefinition;
14
- handler: RequestHandlers;
13
+ handler: any;
15
14
  }
16
15
  export interface EventsProtoDescription {
17
16
  [name: string]: {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Socket.js","sourceRoot":"","sources":["../../src/interfaces/Socket.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- export declare type UntypedArray = any[];
1
+ export type UntypedArray = any[];
@@ -1,8 +1,15 @@
1
- export * from './ConduitSchemaExtension';
2
- export * from './ConduitService';
1
+ export * from './ConduitMiddleware';
2
+ export * from './ConduitRoute';
3
+ export * from './ProxyRoute';
4
+ export * from './Route';
5
+ export * from './Socket';
6
+ export * from './types';
3
7
  export * from './Model';
4
8
  export * from './GrpcCallback';
5
9
  export * from './Indexable';
6
10
  export * from './RawQuery';
7
11
  export * from './UntypedArray';
8
12
  export * from './Params';
13
+ export * from './ConduitRouteReturn';
14
+ export * from './IConduitLogger';
15
+ export * from './IConduitMetrics';
@@ -14,12 +14,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ConduitSchemaExtension"), exports);
18
- __exportStar(require("./ConduitService"), exports);
17
+ __exportStar(require("./ConduitMiddleware"), exports);
18
+ __exportStar(require("./ConduitRoute"), exports);
19
+ __exportStar(require("./ProxyRoute"), exports);
20
+ __exportStar(require("./Route"), exports);
21
+ __exportStar(require("./Socket"), exports);
22
+ __exportStar(require("./types"), exports);
19
23
  __exportStar(require("./Model"), exports);
20
24
  __exportStar(require("./GrpcCallback"), exports);
21
25
  __exportStar(require("./Indexable"), exports);
22
26
  __exportStar(require("./RawQuery"), exports);
23
27
  __exportStar(require("./UntypedArray"), exports);
24
28
  __exportStar(require("./Params"), exports);
29
+ __exportStar(require("./ConduitRouteReturn"), exports);
30
+ __exportStar(require("./IConduitLogger"), exports);
31
+ __exportStar(require("./IConduitMetrics"), exports);
25
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,mDAAiC;AACjC,0CAAwB;AACxB,iDAA+B;AAC/B,8CAA4B;AAC5B,6CAA2B;AAC3B,iDAA+B;AAC/B,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,iDAA+B;AAC/B,+CAA6B;AAC7B,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,iDAA+B;AAC/B,8CAA4B;AAC5B,6CAA2B;AAC3B,iDAA+B;AAC/B,2CAAyB;AACzB,uDAAqC;AACrC,mDAAiC;AACjC,oDAAkC"}
@@ -1,35 +1,37 @@
1
- import { Context, Cookies, Headers, Indexable, Params } from '../../interfaces';
2
- import { GrpcRequest } from '../../types';
3
- export declare type ParsedRouterRequest = GrpcRequest<{
1
+ import { Context, Cookies, Indexable, Params } from './Indexable';
2
+ import { GrpcRequest } from '../types';
3
+ export type ParsedRouterRequest = GrpcRequest<{
4
4
  params: Params;
5
5
  urlParams: Params;
6
6
  queryParams: Params;
7
7
  bodyParams: Params;
8
8
  path: string;
9
- headers: Headers;
9
+ headers: Headers & {
10
+ authorization?: string;
11
+ };
10
12
  context: Context;
11
13
  cookies: Cookies;
12
14
  }>;
13
- export declare type UnparsedRouterResponse = {
15
+ export type UnparsedRouterResponse = {
14
16
  result?: Indexable;
15
17
  redirect?: string;
16
18
  setCookies: Cookies[];
17
19
  removeCookies: Cookies[];
18
20
  } | Indexable | string;
19
- export declare type ParsedSocketRequest = GrpcRequest<{
21
+ export type ParsedSocketRequest = GrpcRequest<{
20
22
  event: string;
21
23
  socketId: string;
22
24
  params: string[];
23
25
  context: Context;
24
26
  cookies: Cookies;
25
27
  }>;
26
- declare type EventResponse = {
28
+ type EventResponse = {
27
29
  event: string;
28
30
  data: Indexable;
29
31
  receivers?: string[];
30
32
  };
31
- export declare type UnparsedSocketResponse = EventResponse | JoinRoomResponse;
32
- declare type JoinRoomResponse = {
33
+ export type UnparsedSocketResponse = EventResponse | JoinRoomResponse;
34
+ type JoinRoomResponse = {
33
35
  rooms: string[];
34
36
  };
35
37
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/routing/interfaces/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/interfaces/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,72 @@
1
+ syntax = "proto3";
2
+ package conduit.module.v1;
3
+
4
+ message SetConfigRequest {
5
+ string newConfig = 1;
6
+ }
7
+
8
+ message SetConfigResponse {
9
+ string updatedConfig = 1;
10
+ }
11
+
12
+ service ConduitModule {
13
+ rpc SetConfig(SetConfigRequest) returns (SetConfigResponse);
14
+ }
15
+
16
+ service ClientRouter {
17
+ rpc Route(Request) returns (Response);
18
+ rpc SocketRoute(SocketRequest) returns (SocketResponse);
19
+ }
20
+ service AdminRouter {
21
+ rpc Route(Request) returns (Response);
22
+ rpc SocketRoute(SocketRequest) returns (SocketResponse);
23
+ }
24
+
25
+ message Request {
26
+ string params = 1;
27
+ string path = 2;
28
+ string headers = 3;
29
+ string context = 4;
30
+ string cookies = 5;
31
+ string bodyParams = 6;
32
+ string urlParams = 7;
33
+ string queryParams = 8;
34
+ string functionName = 9;
35
+ }
36
+
37
+ message Response {
38
+ string result = 1;
39
+ string redirect = 2;
40
+ repeated Cookie setCookies = 3;
41
+ repeated Cookie removeCookies = 4;
42
+ }
43
+ message Cookie {
44
+ string name = 1;
45
+ optional string value = 2;
46
+ CookieOptions options = 3;
47
+ }
48
+
49
+ message CookieOptions {
50
+ bool httpOnly = 1;
51
+ bool secure = 2;
52
+ bool signed = 3;
53
+ int32 maxAge = 4;
54
+ string path = 5;
55
+ string domain = 6;
56
+ string sameSite = 7;
57
+
58
+ }
59
+ message SocketRequest {
60
+ string event = 1;
61
+ string socketId = 2;
62
+ string params = 3;
63
+ string context = 4;
64
+ string functionName = 5;
65
+ }
66
+
67
+ message SocketResponse {
68
+ string event = 1;
69
+ string data = 2;
70
+ repeated string receivers = 3;
71
+ repeated string rooms = 4;
72
+ }
@@ -1,9 +1,9 @@
1
- import { ConduitModule } from '../../classes/ConduitModule';
2
- import { AdminDefinition, RegisterAdminRouteRequest_PathDefinition } from '../../protoUtils/core';
3
- import { ConduitProxyObject, ConduitRouteObject, SocketProtoDescription } from '../../routing';
1
+ import { ConduitModule } from '../../classes';
2
+ import { AdminDefinition, RegisterAdminRouteRequest_PathDefinition } from '../../protoUtils';
3
+ import { ConduitRouteActions } from '../../interfaces';
4
4
  export declare class Admin extends ConduitModule<typeof AdminDefinition> {
5
5
  readonly moduleName: string;
6
6
  constructor(moduleName: string, url: string, grpcToken?: string);
7
- generateProtoFile(moduleName: string, routes: (ConduitRouteObject | SocketProtoDescription | ConduitProxyObject)[]): Promise<import("../../protoUtils/core").GenerateProtoResponse>;
8
- register(paths: RegisterAdminRouteRequest_PathDefinition[], protoFile: string, serverUrl?: string): Promise<any>;
7
+ register(paths: RegisterAdminRouteRequest_PathDefinition[], serverUrl?: string): Promise<any>;
8
+ patchRouteMiddlewares(path: string, action: ConduitRouteActions, middlewares: string[]): Promise<import("../../protoUtils/google/protobuf/empty").Empty>;
9
9
  }
@@ -16,32 +16,31 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.Admin = void 0;
19
- var ConduitModule_1 = require("../../classes/ConduitModule");
20
- var core_1 = require("../../protoUtils/core");
19
+ var classes_1 = require("../../classes");
20
+ var protoUtils_1 = require("../../protoUtils");
21
21
  var Admin = /** @class */ (function (_super) {
22
22
  __extends(Admin, _super);
23
23
  function Admin(moduleName, url, grpcToken) {
24
24
  var _this = _super.call(this, moduleName, 'admin', url, grpcToken) || this;
25
25
  _this.moduleName = moduleName;
26
- _this.initializeClient(core_1.AdminDefinition);
26
+ _this.initializeClient(protoUtils_1.AdminDefinition);
27
27
  return _this;
28
28
  }
29
- Admin.prototype.generateProtoFile = function (moduleName, routes) {
30
- var request = {
31
- moduleName: moduleName,
32
- routes: routes.map(function (r) { return JSON.stringify(r); }),
33
- };
34
- return this.client.generateProto(request);
35
- };
36
- Admin.prototype.register = function (paths, protoFile, serverUrl) {
29
+ Admin.prototype.register = function (paths, serverUrl) {
37
30
  var request = {
38
31
  routes: paths,
39
- protoFile: protoFile,
40
32
  routerUrl: serverUrl,
41
33
  };
42
34
  return this.client.registerAdminRoute(request);
43
35
  };
36
+ Admin.prototype.patchRouteMiddlewares = function (path, action, middlewares) {
37
+ return this.client.patchRouteMiddlewares({
38
+ path: path,
39
+ action: action,
40
+ middlewares: middlewares,
41
+ });
42
+ };
44
43
  return Admin;
45
- }(ConduitModule_1.ConduitModule));
44
+ }(classes_1.ConduitModule));
46
45
  exports.Admin = Admin;
47
46
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,8CAK+B;AAO/B;IAA2B,yBAAqC;IAC9D,eAAqB,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAAxE,YACE,kBAAM,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,SAE3C;QAHoB,gBAAU,GAAV,UAAU,CAAQ;QAErC,KAAI,CAAC,gBAAgB,CAAC,sBAAe,CAAC,CAAC;;IACzC,CAAC;IAED,iCAAiB,GAAjB,UACE,UAAkB,EAClB,MAA4E;QAE5E,IAAM,OAAO,GAAyB;YACpC,UAAU,YAAA;YACV,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAjB,CAAiB,CAAC;SAC3C,CAAC;QACF,OAAO,IAAI,CAAC,MAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED,wBAAQ,GAAR,UACE,KAAiD,EACjD,SAAiB,EACjB,SAAkB;QAElB,IAAM,OAAO,GAA8B;YACzC,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;SACrB,CAAC;QAEF,OAAO,IAAI,CAAC,MAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IACH,YAAC;AAAD,CAAC,AA9BD,CAA2B,6BAAa,GA8BvC;AA9BY,sBAAK"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,yCAA8C;AAC9C,+CAI0B;AAG1B;IAA2B,yBAAqC;IAC9D,eAAqB,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAAxE,YACE,kBAAM,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,SAE3C;QAHoB,gBAAU,GAAV,UAAU,CAAQ;QAErC,KAAI,CAAC,gBAAgB,CAAC,4BAAe,CAAC,CAAC;;IACzC,CAAC;IAED,wBAAQ,GAAR,UACE,KAAiD,EACjD,SAAkB;QAElB,IAAM,OAAO,GAA8B;YACzC,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,SAAS;SACrB,CAAC;QAEF,OAAO,IAAI,CAAC,MAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAED,qCAAqB,GAArB,UACE,IAAY,EACZ,MAA2B,EAC3B,WAAqB;QAErB,OAAO,IAAI,CAAC,MAAO,CAAC,qBAAqB,CAAC;YACxC,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM;YACd,WAAW,EAAE,WAAW;SACzB,CAAC,CAAC;IACL,CAAC;IACH,YAAC;AAAD,CAAC,AA7BD,CAA2B,uBAAa,GA6BvC;AA7BY,sBAAK"}