inviton-backduck 1.0.1 → 1.0.2
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.
- package/dist/exceptions/badRequestException.d.ts +2 -2
- package/dist/exceptions/badRequestException.d.ts.map +1 -1
- package/dist/exceptions/badRequestException.js.map +1 -1
- package/dist/exceptions/exceptionWithHttpCode.d.ts +7 -0
- package/dist/exceptions/exceptionWithHttpCode.d.ts.map +1 -0
- package/dist/exceptions/exceptionWithHttpCode.js +2 -0
- package/dist/exceptions/exceptionWithHttpCode.js.map +1 -0
- package/dist/exceptions/index.d.ts +2 -0
- package/dist/exceptions/index.d.ts.map +1 -1
- package/dist/exceptions/index.js +1 -0
- package/dist/exceptions/index.js.map +1 -1
- package/dist/exceptions/notFoundException.d.ts +2 -2
- package/dist/exceptions/notFoundException.d.ts.map +1 -1
- package/dist/exceptions/notFoundException.js.map +1 -1
- package/dist/exceptions/unauthorizedException.d.ts +2 -2
- package/dist/exceptions/unauthorizedException.d.ts.map +1 -1
- package/dist/exceptions/unauthorizedException.js.map +1 -1
- package/dist/exceptions/workflowInterceptionException.d.ts +19 -0
- package/dist/exceptions/workflowInterceptionException.d.ts.map +1 -0
- package/dist/exceptions/workflowInterceptionException.js +11 -0
- package/dist/exceptions/workflowInterceptionException.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interception/index.d.ts +3 -0
- package/dist/interception/index.d.ts.map +1 -0
- package/dist/interception/index.js +2 -0
- package/dist/interception/index.js.map +1 -0
- package/dist/interception/workflowInteceptionHandler.interface.d.ts +43 -0
- package/dist/interception/workflowInteceptionHandler.interface.d.ts.map +1 -0
- package/dist/interception/workflowInteceptionHandler.interface.js +2 -0
- package/dist/interception/workflowInteceptionHandler.interface.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { IExceptionWithHttpCode } from "./exceptionWithHttpCode";
|
|
2
|
+
interface IBadRequestException extends IExceptionWithHttpCode {
|
|
3
3
|
name: string;
|
|
4
4
|
}
|
|
5
5
|
export default class BadRequestException extends Error implements IBadRequestException {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badRequestException.d.ts","sourceRoot":"","sources":["../../src/exceptions/badRequestException.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"badRequestException.d.ts","sourceRoot":"","sources":["../../src/exceptions/badRequestException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,UAAU,oBAAqB,SAAQ,sBAAsB;IAC5D,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,KAAM,YAAW,oBAAoB;gBACzE,gBAAgB,CAAC,EAAE,MAAM;CAMrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badRequestException.js","sourceRoot":"","sources":["../../src/exceptions/badRequestException.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"badRequestException.js","sourceRoot":"","sources":["../../src/exceptions/badRequestException.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,KAAK;IACrD,YAAY,gBAAyB;QACpC,KAAK,CAAC,gBAAgB,IAAI,aAAa,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC,CAAC,uCAAuC;QACzE,IAA6B,CAAC,QAAQ,GAAG,GAAG,CAAC;QAC9C,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB;IAC1E,CAAC;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exceptionWithHttpCode.d.ts","sourceRoot":"","sources":["../../src/exceptions/exceptionWithHttpCode.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exceptionWithHttpCode.js","sourceRoot":"","sources":["../../src/exceptions/exceptionWithHttpCode.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as BadRequestException } from './badRequestException';
|
|
2
|
+
export type { IExceptionWithHttpCode } from './exceptionWithHttpCode';
|
|
2
3
|
export { default as NotFoundException } from './notFoundException';
|
|
3
4
|
export { default as NotImplementedException } from './notImplementedException';
|
|
4
5
|
export { default as UnauthorizedException } from './unauthorizedException';
|
|
6
|
+
export { default as WorkflowInterceptionException } from './workflowInterceptionException';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,YAAY,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,iCAAiC,CAAC"}
|
package/dist/exceptions/index.js
CHANGED
|
@@ -2,4 +2,5 @@ export { default as BadRequestException } from './badRequestException';
|
|
|
2
2
|
export { default as NotFoundException } from './notFoundException';
|
|
3
3
|
export { default as NotImplementedException } from './notImplementedException';
|
|
4
4
|
export { default as UnauthorizedException } from './unauthorizedException';
|
|
5
|
+
export { default as WorkflowInterceptionException } from './workflowInterceptionException';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { IExceptionWithHttpCode } from "./exceptionWithHttpCode";
|
|
2
|
+
interface INotFoundException extends IExceptionWithHttpCode {
|
|
3
3
|
name: string;
|
|
4
4
|
}
|
|
5
5
|
export default class NotFoundException extends Error implements INotFoundException {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notFoundException.d.ts","sourceRoot":"","sources":["../../src/exceptions/notFoundException.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"notFoundException.d.ts","sourceRoot":"","sources":["../../src/exceptions/notFoundException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,UAAU,kBAAmB,SAAQ,sBAAsB;IAC1D,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAM,YAAW,kBAAkB;gBACrE,gBAAgB,CAAC,EAAE,MAAM;CAMrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notFoundException.js","sourceRoot":"","sources":["../../src/exceptions/notFoundException.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notFoundException.js","sourceRoot":"","sources":["../../src/exceptions/notFoundException.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAK;IACnD,YAAY,gBAAyB;QACpC,KAAK,CAAC,gBAAgB,IAAI,WAAW,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAC/B,IAA2B,CAAC,QAAQ,GAAG,GAAG,CAAC;QAC5C,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB;IAC1E,CAAC;CACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { IExceptionWithHttpCode } from "./exceptionWithHttpCode";
|
|
2
|
+
interface IUnauthorizedException extends IExceptionWithHttpCode {
|
|
3
3
|
name: string;
|
|
4
4
|
}
|
|
5
5
|
export default class UnauthorizedException extends Error implements IUnauthorizedException {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthorizedException.d.ts","sourceRoot":"","sources":["../../src/exceptions/unauthorizedException.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"unauthorizedException.d.ts","sourceRoot":"","sources":["../../src/exceptions/unauthorizedException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,UAAU,sBAAuB,SAAQ,sBAAsB;IAC9D,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,KAAM,YAAW,sBAAsB;gBAC7E,gBAAgB,CAAC,EAAE,MAAM;CAMrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthorizedException.js","sourceRoot":"","sources":["../../src/exceptions/unauthorizedException.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unauthorizedException.js","sourceRoot":"","sources":["../../src/exceptions/unauthorizedException.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,KAAK;IACvD,YAAY,gBAAyB;QACpC,KAAK,CAAC,gBAAgB,IAAI,cAAc,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC,CAAC,uCAAuC;QAC3E,IAA+B,CAAC,QAAQ,GAAG,GAAG,CAAC;QAChD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB;IAC1E,CAAC;CACD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { WorkflowInterception } from "../interception/workflowInteceptionHandler.interface";
|
|
2
|
+
import { IExceptionWithHttpCode } from "./exceptionWithHttpCode";
|
|
3
|
+
interface IWorkflowInterceptionException extends IExceptionWithHttpCode {
|
|
4
|
+
/**
|
|
5
|
+
* Name of the exception for identification.
|
|
6
|
+
*/
|
|
7
|
+
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* Interception information.
|
|
10
|
+
*/
|
|
11
|
+
interception: WorkflowInterception<any, any>;
|
|
12
|
+
}
|
|
13
|
+
export default class WorkflowInterceptionException extends Error implements IWorkflowInterceptionException {
|
|
14
|
+
readonly httpCode: number;
|
|
15
|
+
readonly interception: WorkflowInterception<any, any>;
|
|
16
|
+
constructor(interception: WorkflowInterception<any, any>);
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=workflowInterceptionException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowInterceptionException.d.ts","sourceRoot":"","sources":["../../src/exceptions/workflowInterceptionException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,UAAU,8BAA+B,SAAQ,sBAAsB;IACtE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,YAAY,EAAE,oBAAoB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,KAAM,YAAW,8BAA8B;IACzG,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAO;IAChC,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;gBAE1C,YAAY,EAAE,oBAAoB,CAAC,GAAG,EAAE,GAAG,CAAC;CAMxD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default class WorkflowInterceptionException extends Error {
|
|
2
|
+
httpCode = 400;
|
|
3
|
+
interception;
|
|
4
|
+
constructor(interception) {
|
|
5
|
+
super(interception.message || 'Workflow interception');
|
|
6
|
+
this.name = 'WorkflowInterceptionException'; // Important for identifying error type
|
|
7
|
+
this.interception = interception;
|
|
8
|
+
Object.setPrototypeOf(this, new.target.prototype); // Fix prototype chain
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=workflowInterceptionException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowInterceptionException.js","sourceRoot":"","sources":["../../src/exceptions/workflowInterceptionException.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,KAAK;IACtD,QAAQ,GAAW,GAAG,CAAC;IACvB,YAAY,CAAiC;IAEtD,YAAY,YAA4C;QACvD,KAAK,CAAC,YAAY,CAAC,OAAO,IAAI,uBAAuB,CAAC,CAAC;QACvD,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC,CAAC,uCAAuC;QACpF,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB;IAC1E,CAAC;CACD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export { ControllerGetMiddlewares, Middleware as MiddlewareDecorator, ParseReque
|
|
|
43
43
|
export { ControllerBase, createRouter, type HttpMethod, type IController, WebRouter as UniversalRouter, WebRouter, } from './router';
|
|
44
44
|
export { IS_BUN, RUNTIME } from './runtime-detect';
|
|
45
45
|
export { type BuildableRouter, createServer, type ServerInstance, type StaticFileConfig, UniversalServer, type UniversalServerOptions, } from './server';
|
|
46
|
-
export { BadRequestException, NotFoundException, NotImplementedException, UnauthorizedException, } from './exceptions';
|
|
46
|
+
export { BadRequestException, type IExceptionWithHttpCode, NotFoundException, NotImplementedException, UnauthorizedException, WorkflowInterceptionException, } from './exceptions';
|
|
47
|
+
export { type WorkflowInterception, type WorkflowInterceptionResponse, WorkflowInterceptionResult, } from './interception';
|
|
47
48
|
export { RuntimeUtils } from './utils';
|
|
48
49
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAGH,cAAc,UAAU,CAAC;AAGzB,YAAY,EACX,aAAa,EACb,oBAAoB,IAAI,UAAU,EAClC,YAAY,EACZ,UAAU,IAAI,gBAAgB,EAC9B,UAAU,EACV,WAAW,GACX,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACN,wBAAwB,EACxB,UAAU,IAAI,mBAAmB,EACjC,gBAAgB,EAChB,WAAW,EACX,KAAK,GACL,MAAM,cAAc,CAAC;AAGtB,OAAO,EACN,cAAc,EACd,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,SAAS,IAAI,eAAe,EAC5B,SAAS,GACT,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EACN,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,eAAe,EACf,KAAK,sBAAsB,GAC3B,MAAM,UAAU,CAAC;AAGlB,OAAO,EACN,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAGH,cAAc,UAAU,CAAC;AAGzB,YAAY,EACX,aAAa,EACb,oBAAoB,IAAI,UAAU,EAClC,YAAY,EACZ,UAAU,IAAI,gBAAgB,EAC9B,UAAU,EACV,WAAW,GACX,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACN,wBAAwB,EACxB,UAAU,IAAI,mBAAmB,EACjC,gBAAgB,EAChB,WAAW,EACX,KAAK,GACL,MAAM,cAAc,CAAC;AAGtB,OAAO,EACN,cAAc,EACd,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,SAAS,IAAI,eAAe,EAC5B,SAAS,GACT,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EACN,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,eAAe,EACf,KAAK,sBAAsB,GAC3B,MAAM,UAAU,CAAC;AAGlB,OAAO,EACN,mBAAmB,EACnB,KAAK,sBAAsB,EAC3B,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,GAC7B,MAAM,cAAc,CAAC;AAGtB,OAAO,EACN,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,0BAA0B,GAC1B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -48,7 +48,7 @@ export { IS_BUN, RUNTIME } from './runtime-detect';
|
|
|
48
48
|
// Server - Server creation and configuration
|
|
49
49
|
export { createServer, UniversalServer, } from './server';
|
|
50
50
|
// Exceptions - Common HTTP and workflow exceptions
|
|
51
|
-
export { BadRequestException, NotFoundException, NotImplementedException, UnauthorizedException, } from './exceptions';
|
|
51
|
+
export { BadRequestException, NotFoundException, NotImplementedException, UnauthorizedException, WorkflowInterceptionException, } from './exceptions';
|
|
52
52
|
// Utils - Request parsing and helper utilities
|
|
53
53
|
export { RuntimeUtils } from './utils';
|
|
54
54
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,0FAA0F;AAC1F,cAAc,UAAU,CAAC;AAYzB,kDAAkD;AAClD,OAAO,EACN,wBAAwB,EACxB,UAAU,IAAI,mBAAmB,EACjC,gBAAgB,EAChB,WAAW,EACX,KAAK,GACL,MAAM,cAAc,CAAC;AAEtB,wDAAwD;AACxD,OAAO,EACN,cAAc,EACd,YAAY,EAGZ,SAAS,IAAI,eAAe,EAC5B,SAAS,GACT,MAAM,UAAU,CAAC;AAElB,yDAAyD;AACzD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnD,6CAA6C;AAC7C,OAAO,EAEN,YAAY,EAGZ,eAAe,GAEf,MAAM,UAAU,CAAC;AAElB,mDAAmD;AACnD,OAAO,EACN,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,0FAA0F;AAC1F,cAAc,UAAU,CAAC;AAYzB,kDAAkD;AAClD,OAAO,EACN,wBAAwB,EACxB,UAAU,IAAI,mBAAmB,EACjC,gBAAgB,EAChB,WAAW,EACX,KAAK,GACL,MAAM,cAAc,CAAC;AAEtB,wDAAwD;AACxD,OAAO,EACN,cAAc,EACd,YAAY,EAGZ,SAAS,IAAI,eAAe,EAC5B,SAAS,GACT,MAAM,UAAU,CAAC;AAElB,yDAAyD;AACzD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnD,6CAA6C;AAC7C,OAAO,EAEN,YAAY,EAGZ,eAAe,GAEf,MAAM,UAAU,CAAC;AAElB,mDAAmD;AACnD,OAAO,EACN,mBAAmB,EAEnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,GAC7B,MAAM,cAAc,CAAC;AAStB,+CAA+C;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interception/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,oBAAoB,EACpB,4BAA4B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interception/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response object returned by interceptor methods to indicate the outcome
|
|
3
|
+
* and provide optional interception details.
|
|
4
|
+
*
|
|
5
|
+
* @template TInterception - Type of the custom data attached to the interception
|
|
6
|
+
*/
|
|
7
|
+
export interface WorkflowInterceptionResponse<TInterception, TInterceptionType> {
|
|
8
|
+
/** Indicates whether to continue processing, intercept, or handle error */
|
|
9
|
+
result: WorkflowInterceptionResult;
|
|
10
|
+
/** Optional error information when result is ERROR */
|
|
11
|
+
error?: any;
|
|
12
|
+
/** Optional interception details when result is INTERCEPTED */
|
|
13
|
+
interception?: WorkflowInterception<TInterception, TInterceptionType>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Enumeration defining the possible outcomes of an interceptor method call.
|
|
17
|
+
* Used by the orchestrator to determine whether to continue or stop processing.
|
|
18
|
+
*/
|
|
19
|
+
export declare const enum WorkflowInterceptionResult {
|
|
20
|
+
/** Continue processing normally - no interception occurred */
|
|
21
|
+
OK = 0,
|
|
22
|
+
/** Stop processing - workflow has been intercepted */
|
|
23
|
+
INTERCEPTED = 1,
|
|
24
|
+
/** Soft interception - processing may continue with caution */
|
|
25
|
+
WEAK_INTERCEPTED = 2,
|
|
26
|
+
/** Error occurred during interception - TODO: determine if this is needed */
|
|
27
|
+
ERROR = 3
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Contains detailed information about an interception when processing is stopped.
|
|
31
|
+
* Provides context about why the interception occurred and any relevant data.
|
|
32
|
+
*
|
|
33
|
+
* @template TInterceptionData - Type of the custom data specific to this interception
|
|
34
|
+
*/
|
|
35
|
+
export interface WorkflowInterception<TInterceptionData, TInterceptionType> {
|
|
36
|
+
/** Human-readable message explaining why the interception occurred */
|
|
37
|
+
message: string;
|
|
38
|
+
/** Type/category of the interception for classification purposes */
|
|
39
|
+
type: TInterceptionType;
|
|
40
|
+
/** Custom data relevant to this specific interception */
|
|
41
|
+
data: TInterceptionData;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=workflowInteceptionHandler.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowInteceptionHandler.interface.d.ts","sourceRoot":"","sources":["../../src/interception/workflowInteceptionHandler.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B,CAAC,aAAa,EAAE,iBAAiB;IAC7E,2EAA2E;IAC3E,MAAM,EAAE,0BAA0B,CAAC;IAEnC,sDAAsD;IACtD,KAAK,CAAC,EAAE,GAAG,CAAC;IAEZ,+DAA+D;IAC/D,YAAY,CAAC,EAAE,oBAAoB,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;CACtE;AAED;;;GAGG;AACH,0BAAkB,0BAA0B;IAC3C,8DAA8D;IAC9D,EAAE,IAAI;IAEN,sDAAsD;IACtD,WAAW,IAAI;IAEf,+DAA+D;IAC/D,gBAAgB,IAAI;IAEpB,6EAA6E;IAC7E,KAAK,IAAI;CACT;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB,CAAC,iBAAiB,EAAE,iBAAiB;IACzE,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAEhB,oEAAoE;IACpE,IAAI,EAAE,iBAAiB,CAAC;IAExB,yDAAyD;IACzD,IAAI,EAAE,iBAAiB,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowInteceptionHandler.interface.js","sourceRoot":"","sources":["../../src/interception/workflowInteceptionHandler.interface.ts"],"names":[],"mappings":""}
|