@myxtra/microservice 0.1.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.
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # Xtra microservice
2
+
3
+ This is the codebase for the microservice package which exposes shared functionalties, which are
4
+ used by the different microservice applications.
5
+
6
+ ### Tooling
7
+
8
+ This repo makes use of the following tools:
9
+
10
+ - [TypeScript](https://www.typescriptlang.org/) for static type checking
11
+ - [ESLint](https://eslint.org/) for code linting
12
+ - [Prettier](https://prettier.io) for code formatting
13
+
14
+ ## Setup
15
+
16
+ ### Build
17
+
18
+ To build the package run:
19
+
20
+ ```
21
+ yarn build
22
+ ```
23
+
24
+ ### Develop
25
+
26
+ To develop, do the following:
27
+
28
+ - Run `yarn dev`
@@ -0,0 +1,45 @@
1
+ import { FastifyPluginAsync, FastifyPluginCallback, FastifyInstance } from 'fastify';
2
+ import { z } from 'zod';
3
+
4
+ declare const _default$1: FastifyPluginAsync<never>;
5
+
6
+ declare const validationError: z.ZodObject<{
7
+ method: z.ZodString;
8
+ url: z.ZodString;
9
+ status: z.ZodNumber;
10
+ name: z.ZodString;
11
+ problemJson: z.ZodObject<{
12
+ formErrors: z.ZodArray<z.ZodString, "many">;
13
+ fieldErrors: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ formErrors: string[];
16
+ fieldErrors: Record<string, string[]>;
17
+ }, {
18
+ formErrors: string[];
19
+ fieldErrors: Record<string, string[]>;
20
+ }>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ method: string;
23
+ url: string;
24
+ problemJson: {
25
+ formErrors: string[];
26
+ fieldErrors: Record<string, string[]>;
27
+ };
28
+ status: number;
29
+ name: string;
30
+ }, {
31
+ method: string;
32
+ url: string;
33
+ problemJson: {
34
+ formErrors: string[];
35
+ fieldErrors: Record<string, string[]>;
36
+ };
37
+ status: number;
38
+ name: string;
39
+ }>;
40
+ declare const _default: FastifyPluginCallback<never>;
41
+
42
+ declare const DEFAULT_SPEC_FILE_URL = "../.azure/apim/swagger.json";
43
+ declare const generateSwagger: (app: FastifyInstance, specFile: URL) => void;
44
+
45
+ export { DEFAULT_SPEC_FILE_URL, generateSwagger, _default$1 as swagger, validationError, _default as zod };