esi-cap 1.8.0 → 1.9.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.
@@ -1,310 +0,0 @@
1
- export type CDSService = {
2
- /**
3
- * - Collection of entities served by this service.
4
- */
5
- entities: Record<string, any>;
6
- /**
7
- * - Executes a given query against the service.
8
- */
9
- run: (query: any) => Promise<any>;
10
- /**
11
- * - Starts a new transaction.
12
- */
13
- tx: (req: any) => CDSServiceTx;
14
- /**
15
- * - Alias for the tx method.
16
- */
17
- transaction: (req: any) => CDSServiceTx;
18
- /**
19
- * - Registers a handler for specific events.
20
- */
21
- on: CDSMethod;
22
- /**
23
- * - Registers a handler to run before the standard logic.
24
- */
25
- before: CDSMethod;
26
- /**
27
- * - Registers a handler to run after the standard logic.
28
- */
29
- after: CDSAfterMethod;
30
- /**
31
- * - Synchronously or asynchronously triggers an event.
32
- */
33
- emit: (event: string, data?: any) => Promise<void>;
34
- /**
35
- * - Sends a custom action or function call to the service.
36
- */
37
- send: (action: string, params?: any) => Promise<any>;
38
- /**
39
- * - Deletes records matching the given criteria.
40
- */
41
- delete: (entity: string, where: any) => Promise<number>;
42
- };
43
- export type CDSRequest<T> = {
44
- /**
45
- * - The request payload.
46
- */
47
- data: T & {
48
- params?: any;
49
- };
50
- /**
51
- * - Map of request headers.
52
- */
53
- headers: Record<string, string>;
54
- /**
55
- * - Positional parameters from the URL.
56
- */
57
- params: any[];
58
- /**
59
- * - The authenticated user information.
60
- */
61
- user: CDSUser;
62
- /**
63
- * - The CQN (OData-like) query structure.
64
- */
65
- query: any;
66
- /**
67
- * - Information about the target entity.
68
- */
69
- target: CDSTarget;
70
- /**
71
- * - The name of the event (e.g., 'READ', 'UPDATE').
72
- */
73
- event: string;
74
- /**
75
- * - The underlying HTTP request (if applicable).
76
- */
77
- http?: {
78
- req: {
79
- headers: Record<string, string>;
80
- };
81
- };
82
- /**
83
- * - Rejects the request with a specific status and message.
84
- */
85
- reject: CDSReject;
86
- /**
87
- * - Adds an error to the request without necessarily stopping execution.
88
- */
89
- error: CDSError;
90
- /**
91
- * - Adds a warning message to the response.
92
- */
93
- warn: (opts: {
94
- message: string;
95
- }) => void;
96
- /**
97
- * - Adds an informational message to the response.
98
- */
99
- info: (msg: string) => void;
100
- /**
101
- * - Collection of errors collected during processing.
102
- */
103
- errors?: any[];
104
- /**
105
- * - esi-cap runtime extension: logic to run before the 'on' phase.
106
- */
107
- PreOn?: any;
108
- /**
109
- * - esi-cap runtime extension: logic to run after the 'on' phase.
110
- */
111
- PostOn?: any;
112
- /**
113
- * - esi-cap runtime extension: pre-mashup processing.
114
- */
115
- PreMeshUp?: any;
116
- };
117
- export type CDSUser = {
118
- /**
119
- * - The user's unique identifier.
120
- */
121
- id: string;
122
- /**
123
- * - Custom user attributes.
124
- */
125
- attr: Record<string, any>;
126
- /**
127
- * - Checks if the user has a specific role.
128
- */
129
- is: (role: string) => boolean;
130
- };
131
- export type CDSTarget = {
132
- /**
133
- * - The absolute name of the target entity.
134
- */
135
- name: string;
136
- /**
137
- * - Any projection (select list) applied to the entity.
138
- */
139
- projection?: any;
140
- };
141
- export type CDSReject = (opts?: {
142
- status?: number;
143
- message?: string;
144
- }) => void;
145
- export type CDSError = (opts: {
146
- status?: number;
147
- message?: string;
148
- code?: string;
149
- target?: string;
150
- args?: any[];
151
- }) => void;
152
- /**
153
- * Handles 'on' and 'before' event registrations.
154
- * Supports both signatures: (event, entities, handler) AND (event, handler).
155
- */
156
- export type CDSMethod = (event: string | string[], entitiesOrHandler: any | CDSHandler, handler?: CDSHandler) => void;
157
- /**
158
- * Handles 'after' event registrations.
159
- * Supports both signatures: (event, entities, handler) AND (event, handler).
160
- */
161
- export type CDSAfterMethod = (event: string | string[], entitiesOrHandler: any | CDSAfterHandler, handler?: CDSAfterHandler) => void;
162
- export type CDSHandler = (req: CDSRequest, next: () => Promise<any>) => any | Promise<any>;
163
- export type CDSAfterHandler = (results: any, req: CDSRequest) => any | Promise<any>;
164
- export type CDSServiceTx = CDSService;
165
- export type ServiceEventsServiceInterceptor = (oService: CDSService) => Promise<void>;
166
- export type ServiceEventsRequestInterceptor = (oRequest: CDSRequest) => Promise<any[]>;
167
- export type Service = typeof import("../service").service;
168
- export type ServiceEvents = Service["events"];
169
- export type ServiceEventsKey = keyof ServiceEvents;
170
- export type ServieEventsServiceHandler = Partial<Record<ServiceEventsKey, ServiceEventsServiceInterceptor>>;
171
- export type ServieEventsRequestHandler = Partial<Record<ServiceEventsKey, ServiceEventsRequestInterceptor>>;
172
- /**
173
- * impl module
174
- * @class
175
- * @public
176
- */
177
- /**
178
- * @typedef {Object} CDSService
179
- * @property {Record<string, any>} entities - Collection of entities served by this service.
180
- * @property {(query: any) => Promise<any>} run - Executes a given query against the service.
181
- * @property {(req: any) => CDSServiceTx} tx - Starts a new transaction.
182
- * @property {(req: any) => CDSServiceTx} transaction - Alias for the tx method.
183
- * @property {CDSMethod} on - Registers a handler for specific events.
184
- * @property {CDSMethod} before - Registers a handler to run before the standard logic.
185
- * @property {CDSAfterMethod} after - Registers a handler to run after the standard logic.
186
- * @property {(event: string, data?: any) => Promise<void>} emit - Synchronously or asynchronously triggers an event.
187
- * @property {(action: string, params?: any) => Promise<any>} send - Sends a custom action or function call to the service.
188
- * @property {(entity: string, where: any) => Promise<number>} delete - Deletes records matching the given criteria.
189
- */
190
- /**
191
- * @template T
192
- * @typedef {Object} CDSRequest
193
- * @property {T & { params?: any }} data - The request payload.
194
- * @property {Record<string, string>} headers - Map of request headers.
195
- * @property {any[]} params - Positional parameters from the URL.
196
- * @property {CDSUser} user - The authenticated user information.
197
- * @property {any} query - The CQN (OData-like) query structure.
198
- * @property {CDSTarget} target - Information about the target entity.
199
- * @property {string} event - The name of the event (e.g., 'READ', 'UPDATE').
200
- * @property {{ req: { headers: Record<string, string> } }} [http] - The underlying HTTP request (if applicable).
201
- * @property {CDSReject} reject - Rejects the request with a specific status and message.
202
- * @property {CDSError} error - Adds an error to the request without necessarily stopping execution.
203
- * @property {(opts: { message: string }) => void} warn - Adds a warning message to the response.
204
- * @property {(msg: string) => void} info - Adds an informational message to the response.
205
- * @property {any[]} [errors] - Collection of errors collected during processing.
206
- * @property {any} [PreOn] - esi-cap runtime extension: logic to run before the 'on' phase.
207
- * @property {any} [PostOn] - esi-cap runtime extension: logic to run after the 'on' phase.
208
- * @property {any} [PreMeshUp] - esi-cap runtime extension: pre-mashup processing.
209
- */
210
- /**
211
- * @typedef {Object} CDSUser
212
- * @property {string} id - The user's unique identifier.
213
- * @property {Record<string, any>} attr - Custom user attributes.
214
- * @property {(role: string) => boolean} is - Checks if the user has a specific role.
215
- */
216
- /**
217
- * @typedef {Object} CDSTarget
218
- * @property {string} name - The absolute name of the target entity.
219
- * @property {any} [projection] - Any projection (select list) applied to the entity.
220
- */
221
- /**
222
- * @callback CDSReject
223
- * @param {{ status?: number; message?: string }} [opts]
224
- * @returns {void}
225
- */
226
- /**
227
- * @callback CDSError
228
- * @param {{ status?: number; message?: string; code?: string; target?: string; args?: any[] }} opts
229
- * @returns {void}
230
- */
231
- /**
232
- * Handles 'on' and 'before' event registrations.
233
- * Supports both signatures: (event, entities, handler) AND (event, handler).
234
- * @callback CDSMethod
235
- * @param {string | string[]} event - The name of the event (e.g., 'READ', 'UPDATE').
236
- * @param {any | CDSHandler} entitiesOrHandler - Either the target entity/entities or the handler function.
237
- * @param {CDSHandler} [handler] - The handler function if an entity was provided as the second argument.
238
- * @returns {void}
239
- */
240
- /**
241
- * Handles 'after' event registrations.
242
- * Supports both signatures: (event, entities, handler) AND (event, handler).
243
- * @callback CDSAfterMethod
244
- * @param {string | string[]} event - The name of the event.
245
- * @param {any | CDSAfterHandler} entitiesOrHandler - Either the target entity or the handler function.
246
- * @param {CDSAfterHandler} [handler] - The handler function if an entity was provided.
247
- * @returns {void}
248
- */
249
- /**
250
- * @callback CDSHandler
251
- * @param {CDSRequest} req - The incoming request object.
252
- * @param {() => Promise<any>} next - The function to call the next handler in the chain.
253
- * @returns {any | Promise<any>}
254
- */
255
- /**
256
- * @callback CDSAfterHandler
257
- * @param {any} results - The results from the primary execution.
258
- * @param {CDSRequest} req - The incoming request object.
259
- * @returns {any | Promise<any>}
260
- */
261
- /**
262
- * @typedef {CDSService} CDSServiceTx
263
- */
264
- /**
265
- * @callback ServiceEventsServiceInterceptor
266
- * @param {CDSService} oService - Service object for which request to be executed
267
- * @returns {Promise<void>}
268
- */
269
- /**
270
- * @callback ServiceEventsRequestInterceptor
271
- * @param {CDSRequest} oRequest - Request object
272
- * @returns {Promise<any[]>}
273
- */
274
- /**
275
- * @typedef {typeof import('../service').service} Service
276
- * @typedef {Service['events']} ServiceEvents
277
- * @typedef {keyof ServiceEvents} ServiceEventsKey
278
- * @typedef {Partial<Record<ServiceEventsKey, ServiceEventsServiceInterceptor>>} ServieEventsServiceHandler
279
- * @typedef {Partial<Record<ServiceEventsKey, ServiceEventsRequestInterceptor>>} ServieEventsRequestHandler
280
- */
281
- export class impl {
282
- /**
283
- * @param {object} oService - Service object for which request to be executed
284
- * @param {ServieEventsServiceHandler|ServieEventsRequestHandler} oEvent
285
- * @returns {Promise<void>}
286
- */
287
- static DBService(oService: object, oEvent: ServieEventsServiceHandler | ServieEventsRequestHandler): Promise<void>;
288
- /**
289
- * @param {object} oService - Service object for which request to be executed
290
- * @param {string} sServiceName - Service Name
291
- * @param {ServieEventsServiceHandler|ServieEventsRequestHandler} oEvent
292
- * @param {string|any[]} oLocalEntities
293
- * @param {ServieEventsServiceHandler|ServieEventsRequestHandler} oRemoteEvent
294
- * @param {string|any[]} [oRemoteEntities]
295
- * @param {any[]} [oRemoteHandlers]
296
- * @param {boolean} bRefreshUserContext
297
- * @returns {Promise<void>}
298
- */
299
- static LocalService(oService: object, sServiceName: string, oEvent?: ServieEventsServiceHandler | ServieEventsRequestHandler, oLocalEntities?: string | any[], oRemoteEvent?: ServieEventsServiceHandler | ServieEventsRequestHandler, oRemoteEntities?: string | any[], oRemoteHandlers?: any[], bRefreshUserContext?: boolean): Promise<void>;
300
- /**
301
- * @param {object} oService - Service object for which request to be executed
302
- * @param {ServieEventsServiceHandler|ServieEventsRequestHandler} oEvent
303
- * @param {string|any[]} oEntities
304
- * @param {any[]} [oHandlers]
305
- * @param {boolean} bRefreshUserContext
306
- * @returns {Promise<void>}
307
- */
308
- static RemoteService(oService: object, oEvent?: ServieEventsServiceHandler | ServieEventsRequestHandler, oEntities?: string | any[], oHandlers?: any[], bRefreshUserContext?: boolean): Promise<void>;
309
- }
310
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../.types/lib/impl/index.js"],"names":[],"mappings":"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"}
@@ -1,18 +0,0 @@
1
- declare namespace _exports {
2
- export { Service, ServiceEvents, ServiceEventsValue };
3
- }
4
- declare namespace _exports {
5
- function log(sServiceName?: string | undefined): {
6
- trace: (oEvent: ServiceEventsValue, oRequest: object, ...oArgs: any[]) => void;
7
- debug: (oEvent: ServiceEventsValue, oRequest: object, ...oArgs: any[]) => void;
8
- info: (oEvent: ServiceEventsValue, oRequest: object, ...oArgs: any[]) => void;
9
- warn: (oEvent: ServiceEventsValue, oRequest: object, ...oArgs: any[]) => void;
10
- error: (oEvent: ServiceEventsValue, oRequest: object, ...oArgs: any[]) => void;
11
- fatal: (oEvent: ServiceEventsValue, oRequest: object, ...oArgs: any[]) => void;
12
- };
13
- }
14
- export = _exports;
15
- type Service = typeof import("../service").service;
16
- type ServiceEvents = Service["events"];
17
- type ServiceEventsValue = ServiceEvents[keyof ServiceEvents];
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../.types/lib/log/index.js"],"names":[],"mappings":";;;;IAaS,4BAAY,MAAM,GAAC,SAAS;wBAEe,kBAAkB,YAAuB,MAAM;wBAA/C,kBAAkB,YAAuB,MAAM;uBAA/C,kBAAkB,YAAuB,MAAM;uBAA/C,kBAAkB,YAAuB,MAAM;wBAA/C,kBAAkB,YAAuB,MAAM;wBAA/C,kBAAkB,YAAuB,MAAM;MAsB9F;;;eA9BQ,cAAc,YAAY,EAAE,OAAO;qBACnC,OAAO,CAAC,QAAQ,CAAC;0BACjB,aAAa,CAAC,MAAM,aAAa,CAAC"}
@@ -1,42 +0,0 @@
1
- /**
2
- * - Request Object
3
- */
4
- export type Request = any;
5
- export namespace query {
6
- namespace DELETE {
7
- function getKeyPropertyValueByName(oRequest: Request, sPropertyName: string): any;
8
- }
9
- namespace SELECT {
10
- namespace columns {
11
- function get(oColumns: any): any;
12
- function parse(oQueryString: any, oKeyFields: any): {
13
- ref: any[];
14
- }[];
15
- function split(sQueryString: any): string[];
16
- namespace _expand {
17
- export function parse_1(sExpand: any): {
18
- ref: any[];
19
- };
20
- export { parse_1 as parse };
21
- }
22
- }
23
- namespace from {
24
- function fromable(oFrom: any, iIndex?: number): {
25
- clause: any;
26
- from: any;
27
- where: any;
28
- serviceName: any;
29
- entityName: any;
30
- Association: /*elided*/ any;
31
- };
32
- }
33
- namespace where {
34
- function _toANDArray(oWhereClause: any, bAlwwaysArray?: boolean): any[];
35
- function toANDArray(oWhereClause: any, bAlwwaysArray?: boolean): any[];
36
- function convert(oIDWhere: object, oIDColumns: object, fConvertLogic?: Function): any[];
37
- function add(oRequest: Request, oWhereClause: any[]): void;
38
- function apply(oData: any, oWhereClause: any): any;
39
- }
40
- }
41
- }
42
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../.types/lib/query/index.js"],"names":[],"mappings":";;;;;;QAWmC,6CAAY,OAAO,iBAAyB,MAAM,OAI5E;;;;YAIQ,iCAWJ;YACM;;gBA0BN;YACM,4CAuBN;;gBAEU;;kBAkCN;;;;;YAIK;;;;;;;cA2BT;;;YAGY,wEAkCZ;YACW,uEASX;YACQ,2BAAqB,MAAM,cAAyB,MAAM,mCAWlE;YACI,uBAAY,OAAO,gBAAyB,GAAG,EAAE,QASrD;YACM,mDA+CN"}
@@ -1,111 +0,0 @@
1
- /**
2
- * service module
3
- * @class
4
- * @public
5
- */
6
- export class service {
7
- /** All Service Events
8
- * @public
9
- * @static
10
- * @enum {string} */
11
- public static events: Readonly<{
12
- PreBefore: "PreBefore";
13
- PostBefore: "PostBefore";
14
- PreOn: "PreOn";
15
- PreMeshUp: "PreMeshUp";
16
- PostOn: "PostOn";
17
- PreAfter: "PreAfter";
18
- PostAfter: "PostAfter";
19
- None: "";
20
- }>;
21
- /** This function enriches the user context with configured user function
22
- * @param {object} oRequest - Request Object
23
- */
24
- static enrichUserContext(oRequest: object): Promise<void>;
25
- static sanitizeData(oData: any, oFieldsArray: any, includeID?: boolean): any;
26
- static get(oRequest: any): any;
27
- /**
28
- * @param {object} oService - Service object for which request to be executed
29
- * @param {object} oRequest - Request Object
30
- * @returns {string[]}
31
- */
32
- static getEntityColumns(oService: object, oRequest: object): string[];
33
- /**
34
- * @param {object} oService - Service object for which request to be executed
35
- * @param {object} oRequest - Request Object
36
- * @param {object} oQuery - Query to be send
37
- */
38
- static sendQuery(oService: object, oRequest: object, oQuery?: object): Promise<any>;
39
- /**
40
- * @param {object} oService - Service object for which request to be executed
41
- * @param {object} oRequest - Request Object
42
- */
43
- static sendRequest(oService: object, oRequest: object): Promise<any>;
44
- /**
45
- * @param {object} oService - Service object for which request to be executed
46
- * @param {object} oRequest - Request Object
47
- */
48
- static executeRequest(oService: object, oRequest: object): Promise<any>;
49
- /**
50
- * @param {object} oRequest - Request Object
51
- * @param {object} oJsonData - JSON Data
52
- * @param {(error: Error) => Promise<void>} [onError] - Optional async error handler. Defaults to an empty async function.
53
- */
54
- static executeIflow(oRequest: object, oJsonData: object, onError?: (error: Error) => Promise<void>): Promise<void>;
55
- /**
56
- * @param {object} oService - Service Object
57
- * @param {object} oRequest - Request Object
58
- */
59
- static handleReadByID(oService: object, oRequest: object, oID: any): Promise<any>;
60
- /**
61
- * @param {object} oService - Service Object
62
- * @param {object} oRequest - Request Object
63
- */
64
- static handleDeleteByID(oService: object, oRequest: object, oID: any): Promise<any>;
65
- /**
66
- * @param {object} oService - Service Object
67
- * @param {object} oRequest - Request Object
68
- * @param {function} fEventHandler - function to be called before Event for data handling
69
- */
70
- static handleEvent(oService: object, oRequest: object, fEventHandler?: Function): Promise<any>;
71
- /**
72
- * @param {object} oService - Service Object
73
- * @param {object} oRequest - Request Object
74
- * @param {function} fPreInsert - function to be called before insert
75
- */
76
- static handleCreate(oService: object, oRequest: object, fPreInsert?: Function): Promise<any>;
77
- /**
78
- * @param {object} oService - Service Object
79
- * @param {object} oRequest - Request Object
80
- * @param {function} fPreInsert - function to be called before insert
81
- */
82
- static handleInsert(oService: object, oRequest: object, fPreInsert?: Function): Promise<any>;
83
- /**
84
- * @param {object} oService - Service Object
85
- * @param {object} oRequest - Request Object
86
- * @param {function} fPreUpdate - function to be called before Update
87
- */
88
- static handleUpdate(oService: object, oRequest: object, fPreUpdate: Function, oWhere: any, isOldDataRequired?: boolean): Promise<any>;
89
- /**
90
- * @param {object} oData - Data Result
91
- * @param {object} oRequest - Request Object
92
- */
93
- static handleCount(oData: object, oRequest: object): Promise<void>;
94
- /**
95
- * @param {object} oService - Service Object
96
- * @param {object} oRequest - Request Object
97
- */
98
- static handlePostOn(oService: object, oRequest: object): Promise<any[]>;
99
- /**
100
- * @param {object} oService - Service Object
101
- * @param {object} oRequest - Request Object
102
- */
103
- static handleHandler(oService: object, oRequest: object): Promise<any>;
104
- /**
105
- * @param {object} oService - Service Object
106
- * @param {object} oRequest - Request Object
107
- * @param {function} fNextHandler - Alternate handler method
108
- */
109
- static handleRead(oService: object, oRequest: object, fNextHandler: Function): Promise<any>;
110
- }
111
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../.types/lib/service/index.js"],"names":[],"mappings":"AAsxBA;;;;GAIG;AACH;IAEI;;;wBAGoB;IACpB;;;;;;;;;OASG;IAEH;;OAEG;IACH,mCAFW,MAAM,iBAsBhB;IAED,6EAaC;IAED,+BAEC;IAED;;;;OAIG;IACH,kCAJW,MAAM,YACN,MAAM,GACJ,MAAM,EAAE,CAWpB;IAED;;;;OAIG;IACH,2BAJW,MAAM,YACN,MAAM,WACN,MAAM,gBAgBhB;IAED;;;OAGG;IACH,6BAHW,MAAM,YACN,MAAM,gBAYhB;IAED;;;OAGG;IACH,gCAHW,MAAM,YACN,MAAM,gBAchB;IAED;;;;OAIG;IACH,8BAJW,MAAM,aACN,MAAM,YACN,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,iBAqDzC;IAED;;;OAGG;IACH,gCAHW,MAAM,YACN,MAAM,0BAOhB;IAED;;;OAGG;IACH,kCAHW,MAAM,YACN,MAAM,0BAOhB;IAED;;;;OAIG;IACH,6BAJW,MAAM,YACN,MAAM,0CAiBhB;IAED;;;;OAIG;IACH,8BAJW,MAAM,YACN,MAAM,uCAQhB;IAED;;;;OAIG;IACH,8BAJW,MAAM,YACN,MAAM,uCAQhB;IAED;;;;OAIG;IACH,8BAJW,MAAM,YACN,MAAM,gFAgBhB;IAED;;;OAGG;IACH,0BAHW,MAAM,YACN,MAAM,iBAQhB;IAED;;;OAGG;IACH,8BAHW,MAAM,YACN,MAAM,kBAiChB;IAED;;;OAGG;IACH,+BAHW,MAAM,YACN,MAAM,gBAmChB;IAED;;;;OAIG;IACH,4BAJW,MAAM,YACN,MAAM,wCAQhB;CACJ"}