@ruiapp/rapid-core 0.0.1

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 (134) hide show
  1. package/dist/bootstrapApplicationConfig.d.ts +3 -0
  2. package/dist/core/eventManager.d.ts +7 -0
  3. package/dist/core/http-types.d.ts +3 -0
  4. package/dist/core/httpHandler.d.ts +18 -0
  5. package/dist/core/plugin.d.ts +6 -0
  6. package/dist/core/pluginManager.d.ts +27 -0
  7. package/dist/core/request.d.ts +15 -0
  8. package/dist/core/response.d.ts +17 -0
  9. package/dist/core/routeContext.d.ts +17 -0
  10. package/dist/core/routesBuilder.d.ts +4 -0
  11. package/dist/core/server.d.ts +83 -0
  12. package/dist/dataAccess/dataAccessor.d.ts +20 -0
  13. package/dist/dataAccess/entityManager.d.ts +6 -0
  14. package/dist/dataAccess/entityMapper.d.ts +3 -0
  15. package/dist/dataAccess/filterHelper.d.ts +2 -0
  16. package/dist/dataAccess/propertyMapper.d.ts +3 -0
  17. package/dist/deno-std/assert/assert.d.ts +2 -0
  18. package/dist/deno-std/assert/assertion_error.d.ts +4 -0
  19. package/dist/deno-std/datetime/to_imf.d.ts +17 -0
  20. package/dist/deno-std/http/cookie.d.ts +134 -0
  21. package/dist/helpers/entityHelpers.d.ts +1 -0
  22. package/dist/helpers/inputHelper.d.ts +1 -0
  23. package/dist/helpers/runCollectionEntityHttpHandler.d.ts +5 -0
  24. package/dist/index.d.ts +7 -0
  25. package/dist/index.js +3590 -0
  26. package/dist/plugins/authManager/httpHandlers/createSession.d.ts +8 -0
  27. package/dist/plugins/authManager/httpHandlers/deleteSession.d.ts +4 -0
  28. package/dist/plugins/authManager/httpHandlers/getMyProfile.d.ts +4 -0
  29. package/dist/plugins/authManager/httpHandlers/index.d.ts +5 -0
  30. package/dist/plugins/authManager/mod.d.ts +16 -0
  31. package/dist/plugins/authManager/models/AccessToken.d.ts +3 -0
  32. package/dist/plugins/authManager/models/index.d.ts +2 -0
  33. package/dist/plugins/authManager/routes/getMyProfile.d.ts +3 -0
  34. package/dist/plugins/authManager/routes/index.d.ts +2 -0
  35. package/dist/plugins/authManager/routes/signin.d.ts +3 -0
  36. package/dist/plugins/authManager/routes/signout.d.ts +3 -0
  37. package/dist/plugins/dataManager/httpHandlers/addEntityRelations.d.ts +4 -0
  38. package/dist/plugins/dataManager/httpHandlers/countCollectionEntities.d.ts +4 -0
  39. package/dist/plugins/dataManager/httpHandlers/createCollectionEntitiesBatch.d.ts +4 -0
  40. package/dist/plugins/dataManager/httpHandlers/createCollectionEntity.d.ts +4 -0
  41. package/dist/plugins/dataManager/httpHandlers/deleteCollectionEntityById.d.ts +4 -0
  42. package/dist/plugins/dataManager/httpHandlers/findCollectionEntities.d.ts +4 -0
  43. package/dist/plugins/dataManager/httpHandlers/findCollectionEntityById.d.ts +4 -0
  44. package/dist/plugins/dataManager/httpHandlers/queryDatabase.d.ts +4 -0
  45. package/dist/plugins/dataManager/httpHandlers/removeEntityRelations.d.ts +4 -0
  46. package/dist/plugins/dataManager/httpHandlers/updateCollectionEntityById.d.ts +4 -0
  47. package/dist/plugins/dataManager/mod.d.ts +16 -0
  48. package/dist/plugins/metaManager/httpHandlers/getMetaModelDetail.d.ts +4 -0
  49. package/dist/plugins/metaManager/httpHandlers/listMetaModels.d.ts +4 -0
  50. package/dist/plugins/metaManager/mod.d.ts +15 -0
  51. package/dist/plugins/routeManager/httpHandlers/httpProxy.d.ts +4 -0
  52. package/dist/plugins/routeManager/httpHandlers/listMetaRoutes.d.ts +4 -0
  53. package/dist/plugins/routeManager/mod.d.ts +15 -0
  54. package/dist/plugins/webhooks/mod.d.ts +24 -0
  55. package/dist/plugins/webhooks/pluginConfig.d.ts +48 -0
  56. package/dist/polyfill.d.ts +1 -0
  57. package/dist/proxy/mod.d.ts +13 -0
  58. package/dist/proxy/types.d.ts +17 -0
  59. package/dist/queryBuilder/index.d.ts +1 -0
  60. package/dist/queryBuilder/queryBuilder.d.ts +34 -0
  61. package/dist/server.d.ts +31 -0
  62. package/dist/types.d.ts +327 -0
  63. package/dist/utilities/httpUtility.d.ts +1 -0
  64. package/dist/utilities/jwtUtility.d.ts +8 -0
  65. package/dist/utilities/rapidUtility.d.ts +2 -0
  66. package/dist/utilities/typeUtility.d.ts +3 -0
  67. package/package.json +29 -0
  68. package/rollup.config.js +20 -0
  69. package/src/bootstrapApplicationConfig.ts +524 -0
  70. package/src/core/eventManager.ts +21 -0
  71. package/src/core/http-types.ts +4 -0
  72. package/src/core/httpHandler.ts +29 -0
  73. package/src/core/plugin.ts +13 -0
  74. package/src/core/pluginManager.ts +143 -0
  75. package/src/core/request.ts +23 -0
  76. package/src/core/response.ts +77 -0
  77. package/src/core/routeContext.ts +38 -0
  78. package/src/core/routesBuilder.ts +86 -0
  79. package/src/core/server.ts +144 -0
  80. package/src/dataAccess/dataAccessor.ts +110 -0
  81. package/src/dataAccess/entityManager.ts +651 -0
  82. package/src/dataAccess/entityMapper.ts +74 -0
  83. package/src/dataAccess/filterHelper.ts +47 -0
  84. package/src/dataAccess/propertyMapper.ts +27 -0
  85. package/src/deno-std/assert/assert.ts +9 -0
  86. package/src/deno-std/assert/assertion_error.ts +7 -0
  87. package/src/deno-std/datetime/to_imf.ts +47 -0
  88. package/src/deno-std/http/cookie.ts +398 -0
  89. package/src/helpers/entityHelpers.ts +24 -0
  90. package/src/helpers/inputHelper.ts +11 -0
  91. package/src/helpers/runCollectionEntityHttpHandler.ts +34 -0
  92. package/src/index.ts +12 -0
  93. package/src/plugins/authManager/httpHandlers/createSession.ts +57 -0
  94. package/src/plugins/authManager/httpHandlers/deleteSession.ts +22 -0
  95. package/src/plugins/authManager/httpHandlers/getMyProfile.ts +43 -0
  96. package/src/plugins/authManager/httpHandlers/index.ts +10 -0
  97. package/src/plugins/authManager/mod.ts +56 -0
  98. package/src/plugins/authManager/models/AccessToken.ts +56 -0
  99. package/src/plugins/authManager/models/index.ts +5 -0
  100. package/src/plugins/authManager/routes/getMyProfile.ts +15 -0
  101. package/src/plugins/authManager/routes/index.ts +9 -0
  102. package/src/plugins/authManager/routes/signin.ts +15 -0
  103. package/src/plugins/authManager/routes/signout.ts +15 -0
  104. package/src/plugins/dataManager/httpHandlers/addEntityRelations.ts +76 -0
  105. package/src/plugins/dataManager/httpHandlers/countCollectionEntities.ts +22 -0
  106. package/src/plugins/dataManager/httpHandlers/createCollectionEntitiesBatch.ts +57 -0
  107. package/src/plugins/dataManager/httpHandlers/createCollectionEntity.ts +43 -0
  108. package/src/plugins/dataManager/httpHandlers/deleteCollectionEntityById.ts +38 -0
  109. package/src/plugins/dataManager/httpHandlers/findCollectionEntities.ts +35 -0
  110. package/src/plugins/dataManager/httpHandlers/findCollectionEntityById.ts +30 -0
  111. package/src/plugins/dataManager/httpHandlers/queryDatabase.ts +29 -0
  112. package/src/plugins/dataManager/httpHandlers/removeEntityRelations.ts +72 -0
  113. package/src/plugins/dataManager/httpHandlers/updateCollectionEntityById.ts +53 -0
  114. package/src/plugins/dataManager/mod.ts +150 -0
  115. package/src/plugins/metaManager/httpHandlers/getMetaModelDetail.ts +14 -0
  116. package/src/plugins/metaManager/httpHandlers/listMetaModels.ts +13 -0
  117. package/src/plugins/metaManager/mod.ts +419 -0
  118. package/src/plugins/routeManager/httpHandlers/httpProxy.ts +15 -0
  119. package/src/plugins/routeManager/httpHandlers/listMetaRoutes.ts +13 -0
  120. package/src/plugins/routeManager/mod.ts +97 -0
  121. package/src/plugins/webhooks/mod.ts +144 -0
  122. package/src/plugins/webhooks/pluginConfig.ts +74 -0
  123. package/src/polyfill.ts +5 -0
  124. package/src/proxy/mod.ts +47 -0
  125. package/src/proxy/types.ts +21 -0
  126. package/src/queryBuilder/index.ts +1 -0
  127. package/src/queryBuilder/queryBuilder.ts +424 -0
  128. package/src/server.ts +192 -0
  129. package/src/types.ts +438 -0
  130. package/src/utilities/httpUtility.ts +23 -0
  131. package/src/utilities/jwtUtility.ts +16 -0
  132. package/src/utilities/rapidUtility.ts +5 -0
  133. package/src/utilities/typeUtility.ts +11 -0
  134. package/tsconfig.json +19 -0
@@ -0,0 +1,327 @@
1
+ export type RapidServerConfig = {
2
+ sessionCookieName: string;
3
+ jwtKey: string;
4
+ localFileStoragePath: string;
5
+ };
6
+ export interface IDatabaseConfig {
7
+ dbHost?: string;
8
+ dbPort?: number;
9
+ dbName?: string;
10
+ dbUser?: string;
11
+ dbPassword?: string;
12
+ dbDefaultSchema?: string;
13
+ dbPoolConnections?: number;
14
+ }
15
+ export interface IDatabaseAccessor {
16
+ queryDatabaseObject: (sql: string, params?: unknown[] | Record<string, unknown>) => Promise<any[]>;
17
+ }
18
+ export interface RunEntityHttpHandlerOptions {
19
+ /** 模型所在的命名空间 */
20
+ namespace: string;
21
+ /** 模型Code的单数表示 */
22
+ singularCode: string;
23
+ /** 默认输入 */
24
+ defaultInput: Record<string, any>;
25
+ /** 固定输入 */
26
+ fixedInput: Record<string, any>;
27
+ }
28
+ export interface RunQueryDatabaseHandlerOptions {
29
+ sql: string;
30
+ querySingle?: boolean;
31
+ /** 默认输入 */
32
+ defaultInput: Record<string, any>;
33
+ /** 固定输入 */
34
+ fixedInput: Record<string, any>;
35
+ }
36
+ export interface RunProxyHandlerOptions {
37
+ /** Timeout milli seconds, default as 60000 */
38
+ timeout?: number;
39
+ /** Target url to proxy */
40
+ target: string;
41
+ }
42
+ export interface GetDataAccessorOptions {
43
+ namespace?: string;
44
+ singularCode: string;
45
+ }
46
+ export interface GetModelOptions {
47
+ namespace?: string;
48
+ singularCode: string;
49
+ }
50
+ export type RpdServerEventTypes = {
51
+ "entity.create": [IPluginInstance, RpdEntityCreateEventPayload];
52
+ "entity.update": [IPluginInstance, RpdEntityUpdateEventPayload];
53
+ "entity.delete": [IPluginInstance, RpdEntityDeleteEventPayload];
54
+ "entity.addRelations": [IPluginInstance, RpdEntityAddRelationsEventPayload];
55
+ "entity.removeRelations": [IPluginInstance, RpdEntityRemoveRelationsEventPayload];
56
+ };
57
+ export interface RpdEntityCreateEventPayload {
58
+ namespace: string;
59
+ modelSingularCode: string;
60
+ after: any;
61
+ }
62
+ export interface RpdEntityUpdateEventPayload {
63
+ namespace: string;
64
+ modelSingularCode: string;
65
+ before: any;
66
+ after: any;
67
+ changes: any;
68
+ }
69
+ export interface RpdEntityDeleteEventPayload {
70
+ namespace: string;
71
+ modelSingularCode: string;
72
+ before: any;
73
+ }
74
+ export interface RpdEntityAddRelationsEventPayload {
75
+ namespace: string;
76
+ modelSingularCode: string;
77
+ entity: any;
78
+ property: string;
79
+ relations: any[];
80
+ }
81
+ export interface RpdEntityRemoveRelationsEventPayload {
82
+ namespace: string;
83
+ modelSingularCode: string;
84
+ entity: any;
85
+ property: string;
86
+ relations: any[];
87
+ }
88
+ export interface QuoteTableOptions {
89
+ schema?: string;
90
+ tableName: string;
91
+ }
92
+ export interface IQueryBuilder {
93
+ quoteTable: (options: QuoteTableOptions) => string;
94
+ quoteObject: (name: string) => string;
95
+ }
96
+ export interface RpdApplicationConfig {
97
+ code?: string;
98
+ name?: string;
99
+ models: RpdDataModel[];
100
+ routes: RpdRoute[];
101
+ }
102
+ export interface RpdDataModel {
103
+ maintainedBy?: string;
104
+ name: string;
105
+ namespace: string;
106
+ singularCode: string;
107
+ pluralCode: string;
108
+ schema?: string;
109
+ tableName: string;
110
+ properties: RpdDataModelProperty[];
111
+ extensions?: RpdDataModelExtension[];
112
+ }
113
+ export interface RpdDataModelProperty {
114
+ /**
115
+ * 表示此属性由谁来维护
116
+ */
117
+ maintainedBy?: string;
118
+ /**
119
+ * 字段名称。可以包含中文。
120
+ */
121
+ name: string;
122
+ /**
123
+ * 字段代码。会用于数据表列名和 API 的字段名。
124
+ */
125
+ code: string;
126
+ /**
127
+ * 数据表列名。如果没有设置则使用 code。
128
+ */
129
+ columnName?: string;
130
+ /**
131
+ * 字段类型。
132
+ */
133
+ type: RpdDataPropertyTypes;
134
+ /**
135
+ * 是否必须有值。默认为 false。
136
+ */
137
+ required?: boolean;
138
+ /**
139
+ * 默认值。使用默认值的 SQL 表达式表示。
140
+ */
141
+ defaultValue?: string;
142
+ /**
143
+ * 属性配置。
144
+ */
145
+ config?: Record<string, any>;
146
+ /**
147
+ * 是否自增长。
148
+ */
149
+ autoIncrement?: boolean;
150
+ /**
151
+ * 字段值的最小长度。
152
+ */
153
+ minLength?: number;
154
+ /**
155
+ * 字段值的最大长度。
156
+ */
157
+ maxLength?: number;
158
+ /**
159
+ * 当 type 为 relation 时,设置关联实体为一个还是多个。
160
+ */
161
+ relation?: "one" | "many";
162
+ /**
163
+ * 关联实体的singular code,不管 relation 为 one 或者 many 都需要设置。
164
+ */
165
+ targetSingularCode?: string;
166
+ /**
167
+ * 当 relation 为 one 时,设置当前模型表中表示关联实体 id 的列名。
168
+ * 当 relation 为 many,并且使用关联关系表保存关联信息时,设置关联关系表中表示关联实体 id 的列名。
169
+ * 当 relation 为 many,并且不使用关联关系表保存关联信息时,关联实体 id 的列名默认为`id`,此时可以不设置 targetIdColumnName。
170
+ */
171
+ targetIdColumnName?: string;
172
+ /**
173
+ * 当 relation 为 many 时,设置目标模型表或关联关系表中表示自身实体 id 的列名。
174
+ */
175
+ selfIdColumnName?: string;
176
+ /**
177
+ * 当 relation 为 many 时,可以使用关联关系表保存关联信息,此时需要设置关联关系表的名称。
178
+ */
179
+ linkTableName?: string;
180
+ /**
181
+ * 当设置了 linkTableName 时,可以设置关联关系表所在的 Schema。
182
+ */
183
+ linkSchema?: string;
184
+ }
185
+ export type RpdDataPropertyTypes = "integer" | "long" | "float" | "double" | "decimal" | "text" | "boolean" | "date" | "datetime" | "json" | "relation" | "relation[]" | "option";
186
+ /**
187
+ * 数据字典
188
+ */
189
+ export type RpdDataDictionary = {
190
+ /**
191
+ * 字典编码
192
+ */
193
+ code: string;
194
+ /**
195
+ * 字典名称
196
+ */
197
+ description?: string;
198
+ /**
199
+ * 字典项值类型
200
+ */
201
+ type: 'string' | 'integer';
202
+ /**
203
+ * 字典项
204
+ */
205
+ entries: RpdDataDictionaryEntry[];
206
+ };
207
+ /**
208
+ * 数据字典项
209
+ */
210
+ export type RpdDataDictionaryEntry = {
211
+ /**
212
+ * 名称
213
+ */
214
+ name: string;
215
+ /**
216
+ * 值
217
+ */
218
+ value: string;
219
+ /**
220
+ * 描述
221
+ */
222
+ description?: string;
223
+ /**
224
+ * 排序号
225
+ */
226
+ orderNum: number;
227
+ /**
228
+ * 是否禁用
229
+ */
230
+ disabled: boolean;
231
+ };
232
+ export interface RpdDataModelExtension {
233
+ code: string;
234
+ config: any;
235
+ }
236
+ export interface IPluginInstance {
237
+ getName(): string;
238
+ }
239
+ export type EventHandler<T = any> = (sender: IPluginInstance, payload: T) => void;
240
+ export interface RpdRoute {
241
+ name: string;
242
+ namespace: string;
243
+ code: string;
244
+ type: "RESTful";
245
+ method: RpdHttpMethod;
246
+ endpoint: string;
247
+ handlers: RpdHttpHandler[];
248
+ }
249
+ export type RpdHttpMethod = "get" | "post" | "put" | "delete";
250
+ export interface RpdHttpHandler {
251
+ code: string;
252
+ config: any;
253
+ }
254
+ export interface IRpdDataAccessor<T = any> {
255
+ getModel(): RpdDataModel;
256
+ create(entity: any): Promise<any>;
257
+ updateById(id: any, entity: any): Promise<any>;
258
+ find(options: FindEntityOptions): Promise<T[]>;
259
+ findOne(options: FindEntityOptions): Promise<T | null>;
260
+ findById(id: any): Promise<T | null>;
261
+ count(options: CountEntityOptions): Promise<any>;
262
+ deleteById(id: any): Promise<void>;
263
+ }
264
+ export type EntityFilterRelationalOperators = "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | "notContains" | "containsCS" | "notContainsCS" | "startsWith" | "notStartsWith" | "endsWith" | "notEndsWith";
265
+ export type EntityFilterSetOperators = "in" | "notIn";
266
+ export type EntityFilterLogicalOperators = "or" | "and";
267
+ export type EntityFilterUnaryOperators = "null" | "notNull";
268
+ export type EntityFilterExistenceOperators = "exists" | "notExists";
269
+ export type EntityFilterOperators = EntityFilterRelationalOperators | EntityFilterSetOperators | EntityFilterLogicalOperators | EntityFilterUnaryOperators | EntityFilterExistenceOperators;
270
+ export type EntityFilterOptions = FindEntityRelationalFilterOptions | FindEntitySetFilterOptions | FindEntityLogicalFilterOptions | FindEntityUnaryFilterOptions | FindEntityExistenceFilterOptions;
271
+ export interface FindEntityOptions {
272
+ filters?: EntityFilterOptions[];
273
+ orderBy?: FindEntityOrderByOptions[];
274
+ pagination?: FindEntityPaginationOptions;
275
+ properties?: string[] | Record<string, any>;
276
+ }
277
+ export interface FindEntityRelationalFilterOptions {
278
+ field: string;
279
+ operator: EntityFilterRelationalOperators;
280
+ value: any;
281
+ }
282
+ export interface FindEntitySetFilterOptions {
283
+ field: string;
284
+ operator: EntityFilterSetOperators;
285
+ value: any[];
286
+ itemType?: string;
287
+ }
288
+ export interface FindEntityLogicalFilterOptions {
289
+ operator: EntityFilterLogicalOperators;
290
+ filters: EntityFilterOptions[];
291
+ }
292
+ export interface FindEntityUnaryFilterOptions {
293
+ field: string;
294
+ operator: EntityFilterUnaryOperators;
295
+ }
296
+ export interface FindEntityExistenceFilterOptions {
297
+ field: string;
298
+ operator: EntityFilterExistenceOperators;
299
+ filters: EntityFilterOptions[];
300
+ }
301
+ export interface FindEntityPaginationOptions {
302
+ offset: number;
303
+ limit: number;
304
+ withoutTotal?: boolean;
305
+ }
306
+ export interface FindEntityOrderByOptions {
307
+ field: string;
308
+ desc?: boolean;
309
+ }
310
+ export interface CountEntityOptions {
311
+ filters?: EntityFilterOptions[];
312
+ }
313
+ export interface CreateEntityOptions {
314
+ entity: any;
315
+ }
316
+ export interface UpdateEntityOptions {
317
+ filters?: EntityFilterOptions[];
318
+ entity: any;
319
+ }
320
+ export interface UpdateEntityByIdOptions {
321
+ id: any;
322
+ entity: any;
323
+ changes: any;
324
+ }
325
+ export interface DeleteEntityOptions {
326
+ filters?: EntityFilterOptions[];
327
+ }
@@ -0,0 +1 @@
1
+ export declare function fetchWithTimeout(url: string, reqInit: RequestInit, timeout?: number): Promise<Response>;
@@ -0,0 +1,8 @@
1
+ export declare function getJWTKey(): string;
2
+ export declare function createJWT(payload: Record<string, any>): Promise<string>;
3
+ export declare function verifyJWT(jwt: string): Promise<{}>;
4
+ export declare function decodeJWT(jwt: string): Promise<{
5
+ header: {};
6
+ payload: {};
7
+ signature: {};
8
+ }>;
@@ -0,0 +1,2 @@
1
+ import { RpdDataModelProperty } from "../types";
2
+ export declare function isRelationProperty(property: RpdDataModelProperty): boolean;
@@ -0,0 +1,3 @@
1
+ export declare function isUndefined(val: any): boolean;
2
+ export declare function isNull(val: any): boolean;
3
+ export declare function isNullOrUndefined(val: any): boolean;
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@ruiapp/rapid-core",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "keywords": [],
7
+ "author": "Fossil",
8
+ "license": "MIT",
9
+ "devDependencies": {
10
+ "@types/lodash": "^4.14.186",
11
+ "@types/node": "^20.11.16",
12
+ "rimraf": "^3.0.2",
13
+ "rollup": "^2.79.1",
14
+ "rollup-plugin-tsconfig-paths": "^1.5.2",
15
+ "rollup-plugin-typescript2": "^0.34.1",
16
+ "typescript": "^4.8.4"
17
+ },
18
+ "peerDependencies": {},
19
+ "dependencies": {
20
+ "koa-tree-router": "^0.12.1",
21
+ "lodash": "^4.17.21",
22
+ "qs": "^6.11.0"
23
+ },
24
+ "scripts": {
25
+ "build": "rimraf dist && rollup --config",
26
+ "dev": "rollup --config",
27
+ "test": "echo \"Error: no test specified\""
28
+ }
29
+ }
@@ -0,0 +1,20 @@
1
+ import typescript from 'rollup-plugin-typescript2';
2
+ // import tsConfigPaths from "rollup-plugin-tsconfig-paths"
3
+
4
+ export default {
5
+ input: ["src/index.ts"],
6
+ output: [
7
+ {
8
+ dir: "dist",
9
+ entryFileNames: "[name].js",
10
+ format: "cjs",
11
+ exports: "named"
12
+ }
13
+ ],
14
+ plugins: [
15
+ typescript(),
16
+ // tsConfigPaths(),
17
+ ],
18
+ external: [
19
+ ]
20
+ };