@prosopo/api-route 2.4.1 → 2.5.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,7 +1,8 @@
1
+ import type { Logger } from "@prosopo/common";
1
2
  import type { ZodType, z } from "zod";
2
3
  import type { ApiEndpointResponse } from "./apiEndpointResponse.js";
3
4
  interface ApiEndpoint<T extends ZodType | undefined> {
4
- processRequest: T extends ZodType ? (args: z.infer<T>) => Promise<ApiEndpointResponse> : () => Promise<ApiEndpointResponse>;
5
+ processRequest: T extends ZodType ? (args: z.infer<T>, logger?: Logger) => Promise<ApiEndpointResponse> : (logger?: Logger) => Promise<ApiEndpointResponse>;
5
6
  getRequestArgsSchema(): T;
6
7
  }
7
8
  export type { ApiEndpoint };
@@ -1 +1 @@
1
- {"version":3,"file":"apiEndpoint.d.ts","sourceRoot":"","sources":["../../src/endpoint/apiEndpoint.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,UAAU,WAAW,CAAC,CAAC,SAAS,OAAO,GAAG,SAAS;IAClD,cAAc,EAAE,CAAC,SAAS,OAAO,GAC9B,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,mBAAmB,CAAC,GAClD,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEtC,oBAAoB,IAAI,CAAC,CAAC;CAC1B;AAED,YAAY,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"apiEndpoint.d.ts","sourceRoot":"","sources":["../../src/endpoint/apiEndpoint.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,UAAU,WAAW,CAAC,CAAC,SAAS,OAAO,GAAG,SAAS;IAClD,cAAc,EAAE,CAAC,SAAS,OAAO,GAC9B,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,GACnE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAErD,oBAAoB,IAAI,CAAC,CAAC;CAC1B;AAED,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  declare enum ApiEndpointResponseStatus {
2
2
  SUCCESS = "SUCCESS",
3
- FAIL = "FAIL"
3
+ FAIL = "FAIL",
4
+ PROCESSING = "PROCESSING"
4
5
  }
5
6
  export { ApiEndpointResponseStatus };
6
7
  //# sourceMappingURL=apiEndpointResponseStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apiEndpointResponseStatus.d.ts","sourceRoot":"","sources":["../../src/endpoint/apiEndpointResponseStatus.ts"],"names":[],"mappings":"AAcA,aAAK,yBAAyB;IAC7B,OAAO,YAAY;IACnB,IAAI,SAAS;CACb;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"apiEndpointResponseStatus.d.ts","sourceRoot":"","sources":["../../src/endpoint/apiEndpointResponseStatus.ts"],"names":[],"mappings":"AAcA,aAAK,yBAAyB;IAC7B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,UAAU,eAAe;CACzB;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -2,6 +2,7 @@ var ApiEndpointResponseStatus;
2
2
  (function (ApiEndpointResponseStatus) {
3
3
  ApiEndpointResponseStatus["SUCCESS"] = "SUCCESS";
4
4
  ApiEndpointResponseStatus["FAIL"] = "FAIL";
5
+ ApiEndpointResponseStatus["PROCESSING"] = "PROCESSING";
5
6
  })(ApiEndpointResponseStatus || (ApiEndpointResponseStatus = {}));
6
7
  export { ApiEndpointResponseStatus };
7
8
  //# sourceMappingURL=apiEndpointResponseStatus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"apiEndpointResponseStatus.js","sourceRoot":"","sources":["../../src/endpoint/apiEndpointResponseStatus.ts"],"names":[],"mappings":"AAcA,IAAK,yBAGJ;AAHD,WAAK,yBAAyB;IAC7B,gDAAmB,CAAA;IACnB,0CAAa,CAAA;AACd,CAAC,EAHI,yBAAyB,KAAzB,yBAAyB,QAG7B;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"apiEndpointResponseStatus.js","sourceRoot":"","sources":["../../src/endpoint/apiEndpointResponseStatus.ts"],"names":[],"mappings":"AAcA,IAAK,yBAIJ;AAJD,WAAK,yBAAyB;IAC7B,gDAAmB,CAAA;IACnB,0CAAa,CAAA;IACb,sDAAyB,CAAA;AAC1B,CAAC,EAJI,yBAAyB,KAAzB,yBAAyB,QAI7B;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@prosopo/api-route",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": "20",
8
- "npm": ">=9"
8
+ "npm": "10.8.2"
9
9
  },
10
10
  "exports": {
11
11
  ".": {
@@ -23,7 +23,7 @@
23
23
  "zod": "3.23.8"
24
24
  },
25
25
  "devDependencies": {
26
- "@prosopo/config": "2.4.1"
26
+ "@prosopo/config": "2.5.0"
27
27
  },
28
28
  "author": "PROSOPO LIMITED <info@prosopo.io>",
29
29
  "license": "Apache-2.0",
@@ -1,4 +1,4 @@
1
- // Copyright 2021-2024 Prosopo (UK) Ltd.
1
+ // Copyright 2021-2025 Prosopo (UK) Ltd.
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.