@awarevue/api-types 1.0.55 → 1.0.57

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/index.d.ts CHANGED
@@ -28,3 +28,4 @@ export * from './custom-field';
28
28
  export * from './agent-communication';
29
29
  export * from './cast';
30
30
  export * from './security-level';
31
+ export * from './token-conversion';
package/dist/index.js CHANGED
@@ -44,3 +44,4 @@ __exportStar(require("./custom-field"), exports);
44
44
  __exportStar(require("./agent-communication"), exports);
45
45
  __exportStar(require("./cast"), exports);
46
46
  __exportStar(require("./security-level"), exports);
47
+ __exportStar(require("./token-conversion"), exports);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "Common types between backend, agent(s) and frontend(s)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,56 @@
1
+ import { z } from 'zod';
2
+ export declare const ConversionTypeEnum: z.ZodEnum<["hex-to-decimal"]>;
3
+ export declare const sTokenConversionDto: z.ZodObject<{
4
+ id: z.ZodString;
5
+ name: z.ZodString;
6
+ type: z.ZodEnum<["hex-to-decimal"]>;
7
+ jsonData: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ name: string;
10
+ type: "hex-to-decimal";
11
+ id: string;
12
+ jsonData: {} & {
13
+ [k: string]: unknown;
14
+ };
15
+ }, {
16
+ name: string;
17
+ type: "hex-to-decimal";
18
+ id: string;
19
+ jsonData: {} & {
20
+ [k: string]: unknown;
21
+ };
22
+ }>;
23
+ export declare const sAddTokenConversionRequest: z.ZodObject<Omit<{
24
+ id: z.ZodString;
25
+ name: z.ZodString;
26
+ type: z.ZodEnum<["hex-to-decimal"]>;
27
+ jsonData: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
28
+ }, "id">, "strip", z.ZodTypeAny, {
29
+ name: string;
30
+ type: "hex-to-decimal";
31
+ jsonData: {} & {
32
+ [k: string]: unknown;
33
+ };
34
+ }, {
35
+ name: string;
36
+ type: "hex-to-decimal";
37
+ jsonData: {} & {
38
+ [k: string]: unknown;
39
+ };
40
+ }>;
41
+ export declare const sUpdateTokenConversionRequest: z.ZodObject<{
42
+ name: z.ZodOptional<z.ZodString>;
43
+ type: z.ZodOptional<z.ZodEnum<["hex-to-decimal"]>>;
44
+ jsonData: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ name?: string | undefined;
47
+ type?: "hex-to-decimal" | undefined;
48
+ jsonData?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
49
+ }, {
50
+ name?: string | undefined;
51
+ type?: "hex-to-decimal" | undefined;
52
+ jsonData?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
53
+ }>;
54
+ export type TokenConversionDto = z.infer<typeof sTokenConversionDto>;
55
+ export type AddTokenConversionRequest = z.infer<typeof sAddTokenConversionRequest>;
56
+ export type UpdateTokenConversionRequest = z.infer<typeof sUpdateTokenConversionRequest>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sUpdateTokenConversionRequest = exports.sAddTokenConversionRequest = exports.sTokenConversionDto = exports.ConversionTypeEnum = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ConversionTypeEnum = zod_1.z.enum(['hex-to-decimal']);
6
+ exports.sTokenConversionDto = zod_1.z.object({
7
+ id: zod_1.z.string().uuid(),
8
+ name: zod_1.z.string().min(1).max(64),
9
+ type: exports.ConversionTypeEnum,
10
+ jsonData: zod_1.z.object({}).passthrough(), // Allows any JSON object structure
11
+ });
12
+ exports.sAddTokenConversionRequest = exports.sTokenConversionDto.omit({
13
+ id: true,
14
+ });
15
+ exports.sUpdateTokenConversionRequest = exports.sAddTokenConversionRequest.partial();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "Common types between backend, agent(s) and frontend(s)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",