@nexo-alpha/core 0.1.1 → 0.1.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/api.d.ts +8 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
|
|
2
|
+
export interface NexoRequestContext {
|
|
3
|
+
readonly params: Readonly<Record<string, string>>;
|
|
4
|
+
readonly query: Readonly<Record<string, unknown>>;
|
|
5
|
+
readonly payload: unknown;
|
|
6
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
7
|
+
}
|
|
8
|
+
export type NexoApiHandler = (context: NexoRequestContext) => unknown | Promise<unknown>;
|
|
2
9
|
export interface NexoApi {
|
|
3
10
|
readonly name: string;
|
|
4
11
|
readonly method: HttpMethod;
|
|
@@ -6,5 +13,6 @@ export interface NexoApi {
|
|
|
6
13
|
readonly description?: string;
|
|
7
14
|
readonly purpose?: string;
|
|
8
15
|
readonly dependencies?: readonly string[];
|
|
16
|
+
readonly handler?: NexoApiHandler;
|
|
9
17
|
}
|
|
10
18
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAClB,KAAK,GACL,MAAM,GACN,KAAK,GACL,OAAO,GACP,QAAQ,GACR,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,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@@ -2,7 +2,7 @@ export { createApplication, NexoApplication } from "./application.js";
|
|
|
2
2
|
export type { ApplicationOptions, ApplicationState } from "./application.js";
|
|
3
3
|
export type { NexoModule } from "./module.js";
|
|
4
4
|
export type { NexoService } from "./service.js";
|
|
5
|
-
export type { NexoApi, HttpMethod } from "./api.js";
|
|
5
|
+
export type { NexoApi, HttpMethod, NexoRequestContext, NexoApiHandler } from "./api.js";
|
|
6
6
|
export type { NexoJob } from "./job.js";
|
|
7
7
|
export type { NexoDecision } from "./decision.js";
|
|
8
8
|
export type { NexoConstraint } from "./constraint.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,UAAU,EACX,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,WAAW,EACZ,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,OAAO,EACP,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,UAAU,EACX,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,WAAW,EACZ,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,OAAO,EACR,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,cAAc,EACf,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,YAAY,EACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,aAAa,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAsC1B,OAAO,EACL,YAAY,EACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,aAAa,CAAC"}
|